• Peter Marshall's avatar
    [cpu-profiler] Use instruction start as the key for the CodeMap · ba752ea4
    Peter Marshall authored
    Previously we used the start address of the AbstractCode object. This
    doesn't make sense for off-heap builtins, where the code isn't contained
    in the object itself. It also hides other potential problems - sometimes
    the sample.pc is inside the AbstractCode object header - this is
    never valid.
    
    There were a few changes necessary to make this happen:
      - Change the interface of CodeMoveEvent. Now 'to' and 'from' are both
        AbstractCode objects, which is nice because many users were taking
        'to' and adding the header offset to it to try and find the
        instruction start address. This isn't valid for off-heap builtins.
      - Fix a bug in CodeMap::MoveCode where we didn't update the CodeEntry
        object to reflect the new instruction_start.
      - Rename the 'start' field in all of the CodeEventRecord sub-classes
        to make it clear that this is the address of the first instruction.
      - Fix the confusion in RecordTickSample between 'tos' and 'pc' which
        caused pc_offset to be calculated incorrectly.
    
    Bug: v8:7983
    Change-Id: I3e9dddf74e4b2e96a5f031d216ef7008d6f184d1
    Reviewed-on: https://chromium-review.googlesource.com/1148457
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54749}
    ba752ea4
Name
Last commit
Last update
..
OWNERS Loading commit data...
allocation-tracker.cc Loading commit data...
allocation-tracker.h Loading commit data...
circular-queue-inl.h Loading commit data...
circular-queue.h Loading commit data...
cpu-profiler-inl.h Loading commit data...
cpu-profiler.cc Loading commit data...
cpu-profiler.h Loading commit data...
heap-profiler.cc Loading commit data...
heap-profiler.h Loading commit data...
heap-snapshot-generator-inl.h Loading commit data...
heap-snapshot-generator.cc Loading commit data...
heap-snapshot-generator.h Loading commit data...
profile-generator-inl.h Loading commit data...
profile-generator.cc Loading commit data...
profile-generator.h Loading commit data...
profiler-listener.cc Loading commit data...
profiler-listener.h Loading commit data...
sampling-heap-profiler.cc Loading commit data...
sampling-heap-profiler.h Loading commit data...
strings-storage.cc Loading commit data...
strings-storage.h Loading commit data...
tick-sample.cc Loading commit data...
tick-sample.h Loading commit data...
tracing-cpu-profiler.cc Loading commit data...
tracing-cpu-profiler.h Loading commit data...
unbound-queue-inl.h Loading commit data...
unbound-queue.h Loading commit data...