• Hana Kim's avatar
    cmd/trace: implement /trace?focustask=<taskid> mode · c4874aa2
    Hana Kim authored
    This mode is similar to the default traceview mode where the execution
    trace is presented in P-oriented way. Each row represents a P, and each
    slice represents the time interval of a goroutine's execution on the P.
    
    The difference is that, in this mode, only the execution of goroutines
    involved in the specified task is highlighted, and other goroutine
    execution or events are greyed out. So, users can focus on how a task is
    executed while considering other affecting conditions such as other
    goroutines, network events, or process scheduling.
    
    Example: https://user-images.githubusercontent.com/4999471/38116793-a6f995f0-337f-11e8-8de9-88eec2f2c497.png
    
    Here, for a while the program remained idle after the first burst of
    activity related to the task because all other goroutines were also
    being blocked or waiting for events, or no incoming network traffic
    (indicated by the lack of any network activity). This is a bit hard to
    discover when the usual task-oriented view (/trace?taskid=<taskid>)
    mode.
    
    Also, it simplifies the traceview generation mode logic.
      /trace ---> 0
      /trace?goid ---> modeGoroutineOriented
      /trace?taskid ---> modeGoroutineOriented|modeTaskOriented
      /trace?focustask ---> modeTaskOriented
    
    Change-Id: Idcc0ae31b708ddfd19766f4e26ee7efdafecd3a5
    Reviewed-on: https://go-review.googlesource.com/103555
    Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
    Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
    c4874aa2
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...