• Peter Marshall's avatar
    [cpu-profiler] Add a new profiling mode with a more detailed call tree. · ecae80cd
    Peter Marshall authored
    The current profiling mode (called kLeafNodeLineNumbers in this CL)
    produces a tree, with each node representing a stack frame that is seen
    in one or more samples taken during profiling. These nodes refer to a
    particular function in a stack trace, but not to a particular line or
    callsite within that function.
    
    This CL adds a new more (called kCallerLineNumbers) which produces a
    different profile tree, where each stack trace seen during profiling,
    including the line number, has a unique path in the tree.
    
    The profile tree was previously keyed on CodeEntry*. Now it is keyed on
    the pair of CodeEntry* and line_number, meaning it has distinct nodes
    for those combinations which exist, and each distinct stack trace that
    was sampled is represented in the tree.
    
    For optimized code where we have inline frames, there are no line
    numbers for the inline frames in the stack trace, causing duplicate
    branches in the tree with kNoLineNumberInfo as the reported line number.
    This will be addressed in follow-ups.
    
    Bug: v8:7018
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I512e221508f5b50ec028306d212263b514a9fb24
    Reviewed-on: https://chromium-review.googlesource.com/1013493
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53298}
    ecae80cd
cpu-profiler.cc 13.4 KB