1. 26 Jan, 2021 2 commits
  2. 22 Dec, 2020 1 commit
  3. 10 Dec, 2020 1 commit
  4. 08 Dec, 2020 3 commits
    • Clemens Backes's avatar
      Reland "[wasm] Pass the script ID to code logging" · a58a5e59
      Clemens Backes authored
      This is a reland of ab4d9717.
      The original CL did a std::move before the final use of the NativeModule.
      PS2 removes that.
      
      TBR=petermarshall@chromium.org, thibaudm@chromium.org
      
      Original change's description:
      > [wasm] Pass the script ID to code logging
      >
      > We didn't pass a script ID with the code creation events for profiling.
      > This made DevTools lose the connection to the wasm script, hence
      > jumping from the profiler entry to the source did not work.
      >
      > This CL changes the timing of code logging a bit such that the script is
      > always allocated before logging. In the queue of code to be logged we
      > then also store the script ID, and finally set it on the {CodeEntry}
      > object.
      >
      > R=thibaudm@chromium.org
      >
      > Bug: chromium:1125986
      > Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71654}
      
      Bug: chromium:1125986
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      Change-Id: I2a7c5fe04fff726836b1279e3d05b1702a4efb76
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2578980Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71663}
      a58a5e59
    • Clemens Backes's avatar
      Revert "[wasm] Pass the script ID to code logging" · 8d013ea1
      Clemens Backes authored
      This reverts commit ab4d9717.
      
      Reason for revert: UBSan issues: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/14184/overview
      
      Original change's description:
      > [wasm] Pass the script ID to code logging
      >
      > We didn't pass a script ID with the code creation events for profiling.
      > This made DevTools lose the connection to the wasm script, hence
      > jumping from the profiler entry to the source did not work.
      >
      > This CL changes the timing of code logging a bit such that the script is
      > always allocated before logging. In the queue of code to be logged we
      > then also store the script ID, and finally set it on the {CodeEntry}
      > object.
      >
      > R=​thibaudm@chromium.org
      >
      > Bug: chromium:1125986
      > Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71654}
      
      TBR=petermarshall@chromium.org,clemensb@chromium.org,thibaudm@chromium.org
      
      Change-Id: I03c90c77b55e770797a6d66b1d778992a047e07a
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:1125986
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575070Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71660}
      8d013ea1
    • Clemens Backes's avatar
      [wasm] Pass the script ID to code logging · ab4d9717
      Clemens Backes authored
      We didn't pass a script ID with the code creation events for profiling.
      This made DevTools lose the connection to the wasm script, hence
      jumping from the profiler entry to the source did not work.
      
      This CL changes the timing of code logging a bit such that the script is
      always allocated before logging. In the queue of code to be logged we
      then also store the script ID, and finally set it on the {CodeEntry}
      object.
      
      R=thibaudm@chromium.org
      
      Bug: chromium:1125986
      Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71654}
      ab4d9717
  5. 11 Nov, 2020 1 commit
  6. 14 Sep, 2020 1 commit
  7. 07 Jul, 2020 2 commits
  8. 02 Jan, 2020 1 commit
  9. 04 Dec, 2019 1 commit
  10. 20 Aug, 2019 1 commit
  11. 21 May, 2019 1 commit
  12. 25 Apr, 2019 1 commit
  13. 24 Apr, 2019 2 commits
  14. 27 Mar, 2019 1 commit
  15. 13 Mar, 2019 1 commit
  16. 11 Feb, 2019 1 commit
  17. 04 Jan, 2019 1 commit
    • Peter Marshall's avatar
      [cpu-profiler] Reduce the size of inlining information · a0572f0b
      Peter Marshall authored
      Previously we stored the source position table, which stored a mapping
      of pc offsets to line numbers, and the inline_locations, which stored a
      mapping of pc offsets to stacks of {CodeEntry, line_number} pairs. This
      was slightly wasteful because we had two different tables which were
      both keyed on the pc offset and contained some overlapping information.
      
      This CL combines the two tables in a way. The source position table now
      maps a pc offset to a pair of {line_number, inlining_id}. If the
      inlining_id is valid, then it can be used to look up the inlining stack
      which is stored in inline_locations, but is now keyed by inlining_id
      rather than pc offset. This also has the nice effect of de-duplicating
      inline stacks which we previously duplicated.
      
      The new structure is similar to how this data is stored by the compiler,
      except that we convert 'source positions' (char offset in a file) into
      line numbers as we go, because we only care about attributing ticks to
      a given line.
      
      Also remove the helper RecordInliningInfo() as this is only actually
      used to add inline stacks by one caller (where it is now inlined). The
      other callers would always bail out or are only called from
      test-cpu-profiler.
      
      Remove AddInlineStack and replace it with SetInlineStacks which adds all
      of the stacks at once. We need to do it this way because the source pos
      table is passed into the constructor of CodeEntry, so we need to create
      it before the CodeEntry, but the inline stacks are not (they are part of
      rare_data which is not always present), so we need to add them after
      construction. Given that we calculate both the source pos table and the
      inline stacks before construction, it's just easier to add them all at
      once.
      
      Also add a print() method to CodeEntry to make future debugging easier
      as I'm constantly rewriting this locally.
      
      Bug: v8:8575, v8:7719, v8:7203
      
      Change-Id: I39324d6ea13d116d5da5d0a0d243cae76a749c79
      Reviewed-on: https://chromium-review.googlesource.com/c/1392195
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58554}
      a0572f0b
  18. 28 Nov, 2018 1 commit
  19. 27 Nov, 2018 1 commit
  20. 25 Nov, 2018 1 commit
  21. 12 Nov, 2018 1 commit
  22. 27 Jul, 2018 1 commit
    • 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
  23. 13 Jun, 2018 1 commit
  24. 24 May, 2018 2 commits
  25. 16 May, 2018 1 commit
    • Alexei Filippov's avatar
      [cpu-profiler] Eagerly delete not used CodeEntry'es · c6c28f7a
      Alexei Filippov authored
      Currently ProfilerListener holds all the CodeEntries it ever
      created during the profiling session. It is not capable of removing
      entries corresponding to the code objects discarded by GC as there's
      no such code event.
      
      However it is sometimes possible to tell if a code object was GCed.
      Hook up to the CodeMap code entry removal and if the entry has never
      been hit by a sample we can safely delete it.
      
      As a bonus the CodeEntryInfo size has been reduced on x64, which also
      saves 8 x <number of code entries> bytes.
      
      BUG=v8:7719
      
      Change-Id: I988bc5b59f3fba07157a9f472cbcf68596fcd969
      Reviewed-on: https://chromium-review.googlesource.com/1054346Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Alexei Filippov <alph@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53222}
      c6c28f7a
  26. 09 May, 2018 1 commit
  27. 07 May, 2018 1 commit
  28. 04 May, 2018 1 commit
  29. 18 Apr, 2018 1 commit
  30. 17 Apr, 2018 2 commits
  31. 14 Apr, 2018 1 commit
    • Jakob Kummerow's avatar
      [ubsan] Change Address typedef to uintptr_t · 2459046c
      Jakob Kummerow authored
      The "Address" type is V8's general-purpose type for manipulating memory
      addresses. Per the C++ spec, pointer arithmetic and pointer comparisons
      are undefined behavior except within the same array; since we generally
      don't operate within a C++ array, our general-purpose type shouldn't be
      a pointer type.
      
      Bug: v8:3770
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ib96016c24a0f18bcdba916dabd83e3f24a1b5779
      Reviewed-on: https://chromium-review.googlesource.com/988657
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52601}
      2459046c
  32. 12 Apr, 2018 1 commit
    • Peter Marshall's avatar
      [cpu-profiler] Fix bugs and add tests for JITLineInfoTable · 4feb5ce7
      Peter Marshall authored
      Looking up line numbers with the JITLineInfoTable would sometimes give
      wrong answers. Fix these bugs and add a cctest for this data structure.
      
      Also do some cleanup while we're here like inlining the (empty)
      constructor and destructor and removing the empty() method which is
      only used unnecessarily anyway, to make the contract of
      GetSourceLineNumber a bit clearer.
      
      Also rename the data structure to SourcePositionTable, because it
      doesn't just provide info for JIT code, but also bytecode, and 'Info'
      is pretty ambiguous.
      
      Bug: v8:7018
      Change-Id: I126581c844d85df6b2b3f80f2f5acbce01c16ba1
      Reviewed-on: https://chromium-review.googlesource.com/1006795Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52571}
      4feb5ce7
  33. 22 Mar, 2018 1 commit