1. 17 Aug, 2016 1 commit
    • rmcilroy's avatar
      Avoid accessing Isolate in source position logging. · b8b4a443
      rmcilroy authored
      Now that all backends use the source position builder to record source
      positions, simplify the code line logging events to take a source
      position table on code creation. This means that the source position
      table builder no longer needs to access the isolate until the table is
      generated. This is required for off-thread bytecode generation.
      
      BUG=v8:5203
      
      Review-Url: https://codereview.chromium.org/2248673002
      Cr-Commit-Position: refs/heads/master@{#38676}
      b8b4a443
  2. 28 Jul, 2016 1 commit
  3. 12 Jul, 2016 1 commit
  4. 11 Jul, 2016 1 commit
  5. 09 Jul, 2016 1 commit
  6. 06 Jul, 2016 1 commit
    • lpy's avatar
      Expose TickSample and its APIs in v8-profiler.h · 3172f6a9
      lpy authored
      We want to eventually move the profiling functionality out of V8 as library,
      this patch exposes TickSample and its APIs in v8-profiler.h so that when
      embedders use library, they can have more details.
      
      Minor change: Rename tick-sample.[h|cc] to simulator-helper.[h|cc].
      
      BUG=v8:4789
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2105943002
      Cr-Commit-Position: refs/heads/master@{#37564}
      3172f6a9
  7. 30 Jun, 2016 1 commit
  8. 22 Jun, 2016 1 commit
    • lpy's avatar
      [Reland] Refactor CpuProfiler. · 04f710ac
      lpy authored
      Currently CpuProfiler is a subclass of CodeEventListener, it listens code events
      from Logger, constructs and stores CodeEventsContainer. This patch is part of
      the effort to split the logic of CodeEventListener as ProfilerListener out of
      the profiling functionality logic in CpuProfiler. A ProfilerListener will listen
      to code events, construct code event to CodeEventsContainer and pass it to code
      event handler.
      
      The reason we refactor CpuProfiler is that eventually we want to move
      CpuProfiler as part of sampler library and code event listener should stay
      inside V8.
      
      Main changes:
      1. Refactored CpuProfiler into two parts, the CpuProfiler with profling
      functionality and the ProfilerListener listening to code events from Logger.
      2. Created CodeEventObserver and made CpuProfiler inherit from it.
      ProfilerListener will have a list of observers and call CodeEventHandler once a
      code event is created.
      3. Moved code entry list from CodeEntry to ProfilerListener.
      
      Minor changes:
      1. Moved static code entry as part of CodeEntry.
      2. Added ProfilerListener to Logger.
      
      BUG=v8:4789
      
      Committed: https://crrev.com/cb59fc1facc9b390e2c7544b4da56a4e0a9b3222
      Review-Url: https://codereview.chromium.org/2053523003
      Cr-Original-Commit-Position: refs/heads/master@{#37112}
      Cr-Commit-Position: refs/heads/master@{#37195}
      04f710ac
  9. 20 Jun, 2016 2 commits
    • lpy's avatar
      Revert of Refactor CpuProfiler. (patchset #13 id:240001 of... · d6be0bf6
      lpy authored
      Revert of Refactor CpuProfiler. (patchset #13 id:240001 of https://codereview.chromium.org/2053523003/ )
      
      Reason for revert:
      MIPS compilation error.
      
      Original issue's description:
      > Refactor CpuProfiler.
      >
      > Currently CpuProfiler is a subclass of CodeEventListener, it listens code events
      > from Logger, constructs and stores CodeEventsContainer. This patch is part of
      > the effort to split the logic of CodeEventListener as ProfilerListener out of
      > the profiling functionality logic in CpuProfiler. A ProfilerListener will listen
      > to code events, construct code event to CodeEventsContainer and pass it to code
      > event handler.
      >
      > The reason we refactor CpuProfiler is that eventually we want to move
      > CpuProfiler as part of sampler library and code event listener should stay
      > inside V8.
      >
      > Main changes:
      > 1. Refactored CpuProfiler into two parts, the CpuProfiler with profling
      > functionality and the ProfilerListener listening to code events from Logger.
      > 2. Created CodeEventObserver and made CpuProfiler inherit from it.
      > ProfilerListener will have a list of observers and call CodeEventHandler once a
      > code event is created.
      > 3. Moved code entry list from CodeEntry to ProfilerListener.
      >
      > Minor changes:
      > 1. Moved static code entry as part of CodeEntry.
      > 2. Added ProfilerListener to Logger.
      >
      > BUG=v8:4789
      >
      > Committed: https://crrev.com/cb59fc1facc9b390e2c7544b4da56a4e0a9b3222
      > Cr-Commit-Position: refs/heads/master@{#37112}
      
      TBR=alph@chromium.org,jochen@chromium.org,yangguo@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4789
      
      Review-Url: https://codereview.chromium.org/2079273003
      Cr-Commit-Position: refs/heads/master@{#37113}
      d6be0bf6
    • lpy's avatar
      Refactor CpuProfiler. · cb59fc1f
      lpy authored
      Currently CpuProfiler is a subclass of CodeEventListener, it listens code events
      from Logger, constructs and stores CodeEventsContainer. This patch is part of
      the effort to split the logic of CodeEventListener as ProfilerListener out of
      the profiling functionality logic in CpuProfiler. A ProfilerListener will listen
      to code events, construct code event to CodeEventsContainer and pass it to code
      event handler.
      
      The reason we refactor CpuProfiler is that eventually we want to move
      CpuProfiler as part of sampler library and code event listener should stay
      inside V8.
      
      Main changes:
      1. Refactored CpuProfiler into two parts, the CpuProfiler with profling
      functionality and the ProfilerListener listening to code events from Logger.
      2. Created CodeEventObserver and made CpuProfiler inherit from it.
      ProfilerListener will have a list of observers and call CodeEventHandler once a
      code event is created.
      3. Moved code entry list from CodeEntry to ProfilerListener.
      
      Minor changes:
      1. Moved static code entry as part of CodeEntry.
      2. Added ProfilerListener to Logger.
      
      BUG=v8:4789
      
      Review-Url: https://codereview.chromium.org/2053523003
      Cr-Commit-Position: refs/heads/master@{#37112}
      cb59fc1f
  10. 15 Jun, 2016 1 commit
  11. 14 Jun, 2016 1 commit
    • ishell's avatar
      [ic] Split LoadIC into LoadGlobalIC and LoadIC. · d9e8764f
      ishell authored
      The former will handle loads of predeclared global variables (vars and
      functions), lets, consts and undeclared variables. The latter will handle
      named loads from explicit receiver. In addition, named loads does not
      depend of the TypeofMode.
      
      TypeofMode related cleanup will be done in the follow-up CL.
      
      BUG=chromium:576312
      LOG=Y
      TBR=bmeurer@chromium.org
      
      Review-Url: https://codereview.chromium.org/1912633002
      Cr-Commit-Position: refs/heads/master@{#36965}
      d9e8764f
  12. 10 Jun, 2016 1 commit
  13. 26 May, 2016 1 commit
    • lpy's avatar
      Reland: Create libsampler as V8 sampler library. · a0198c0f
      lpy authored
      This patch does five things:
      
      1. Extracts sampler as libsampler to provide sampling functionality support.
      2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
      3. Removes sampler.[h|cc].
      4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
      5. Creates SamplerManager to manage the relationship between samplers and threads.
      
      The reason we port hashmap.h is that in debug mode, STL containers are using
      mutexes from a mutex pool, which may lead to deadlock when using asynchronously
      signal handler.
      
      Currently libsampler is used in V8 temporarily.
      
      BUG=v8:4789
      LOG=n
      
      Committed: https://crrev.com/06cc9b7c176a6223971deaa9fbcafe1a05058c7b
      Cr-Commit-Position: refs/heads/master@{#36527}
      
      Review-Url: https://codereview.chromium.org/1922303002
      Cr-Commit-Position: refs/heads/master@{#36532}
      a0198c0f
  14. 25 May, 2016 2 commits
    • lpy's avatar
      Revert of Create libsampler as V8 sampler library. (patchset #24 id:460001 of... · 636f1e8e
      lpy authored
      Revert of Create libsampler as V8 sampler library. (patchset #24 id:460001 of https://codereview.chromium.org/1922303002/ )
      
      Reason for revert:
      V8 Linux64 TSAN failure because ThreadSanitizer indicated data race.
      
      Original issue's description:
      > Create libsampler as V8 sampler library.
      >
      > This patch does five things:
      >
      > 1. Extracts sampler as libsampler to provide sampling functionality support.
      > 2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
      > 3. Removes sampler.[h|cc].
      > 4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
      > 5. Creates SamplerManager to manage the relationship between samplers and threads.
      >
      > The reason we port hashmap.h is that in debug mode, STL containers are using
      > mutexes from a mutex pool, which may lead to deadlock when using asynchronously
      > signal handler.
      >
      > Currently libsampler is used in V8 temporarily.
      >
      > BUG=v8:4789
      > LOG=n
      >
      > Committed: https://crrev.com/06cc9b7c176a6223971deaa9fbcafe1a05058c7b
      > Cr-Commit-Position: refs/heads/master@{#36527}
      
      TBR=jochen@chromium.org,alph@chromium.org,fmeawad@chromium.org,yangguo@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4789
      
      Review-Url: https://codereview.chromium.org/2000323007
      Cr-Commit-Position: refs/heads/master@{#36529}
      636f1e8e
    • lpy's avatar
      Create libsampler as V8 sampler library. · 06cc9b7c
      lpy authored
      This patch does five things:
      
      1. Extracts sampler as libsampler to provide sampling functionality support.
      2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
      3. Removes sampler.[h|cc].
      4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
      5. Creates SamplerManager to manage the relationship between samplers and threads.
      
      The reason we port hashmap.h is that in debug mode, STL containers are using
      mutexes from a mutex pool, which may lead to deadlock when using asynchronously
      signal handler.
      
      Currently libsampler is used in V8 temporarily.
      
      BUG=v8:4789
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1922303002
      Cr-Commit-Position: refs/heads/master@{#36527}
      06cc9b7c
  15. 13 May, 2016 1 commit
  16. 02 May, 2016 1 commit
  17. 21 Apr, 2016 1 commit
    • mstarzinger's avatar
      [profiler] Remove obsolete CompilationInfo argument. · 6f43e1f5
      mstarzinger authored
      This removes the CompilationInfo argument from one of the logging
      functions where it is unused. The long-term goal is to not pass around
      the CompilationInfo at all. The assumption that the CompilationInfo is
      available is incompatible with serialized code, where compilation has
      happened during building time of V8 itself.
      
      R=yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1901353003
      
      Cr-Commit-Position: refs/heads/master@{#35705}
      6f43e1f5
  18. 12 Apr, 2016 1 commit
  19. 11 Apr, 2016 2 commits
  20. 08 Apr, 2016 2 commits
    • jfb's avatar
      Revert of Fix printf formats (patchset #8 id:140001 of... · 4c4fdc2d
      jfb authored
      Revert of Fix printf formats (patchset #8 id:140001 of https://codereview.chromium.org/1869433004/ )
      
      Reason for revert:
      One small issue easily fixed here: https://codereview.chromium.org/1867333003/
      
      But it looks like MSVS 2013 doesn't like some of the formats and exists with the unhelpful:
      Stderr:
      f:\dd\vctools\crt\crtw32\stdio\output.c(1125) : Assertion failed: ("Incorrect
      format specifier", 0)
      
      It's easier to revert for now, I'll dig more into the docs:
      https://msdn.microsoft.com/en-us/library/56e442dc(v=vs.120).aspx
      https://msdn.microsoft.com/en-us/library/tcxf1dw6(v=vs.120).aspx
      
      And then resubmit, making sure I run these bots.
      
      Original issue's description:
      > Fix printf formats
      >
      > The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:
      >
      >  - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
      >  - Uses it appropriately.
      >  - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
      >  - Fixes a bunch of incorrect formats.
      >
      > R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org
      >
      > Committed: https://crrev.com/6ebf9fbb93d31f9be41156a3325d58704ed4933d
      > Cr-Commit-Position: refs/heads/master@{#35365}
      
      TBR=jochen@chromium.org,bmeurer@chromium.org,yangguo@chromium.org,ahaas@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1867383002
      
      Cr-Commit-Position: refs/heads/master@{#35366}
      4c4fdc2d
    • jfb's avatar
      Fix printf formats · 6ebf9fbb
      jfb authored
      The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:
      
       - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
       - Uses it appropriately.
       - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
       - Fixes a bunch of incorrect formats.
      
      R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org
      
      Review URL: https://codereview.chromium.org/1869433004
      
      Cr-Commit-Position: refs/heads/master@{#35365}
      6ebf9fbb
  21. 06 Apr, 2016 1 commit
    • verwaest's avatar
      Use a dictionary-mode code cache on the map rather than a dual system. · d2eb555e
      verwaest authored
      The previous code cache system required stubs to be marked with a StubType, causing them to be inserted either into a fixed array or into a dictionary-mode code cache. This could cause names to be in both cases, and lookup would just find the "fast" one first. Given that we clear out the caches on each GC, the memory overhead shouldn't be too bad. Additionally, the dictionary itself should just stay linear for small arrays; that's faster anyway.
      
      This CL additionally deletes some dead IC code.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1846963002
      
      Cr-Commit-Position: refs/heads/master@{#35291}
      d2eb555e
  22. 05 Apr, 2016 1 commit
  23. 29 Mar, 2016 1 commit
    • jarin's avatar
      Linux perf integration with the new support for JIT. · 82e95f59
      jarin authored
      Difference from --perf-basic-prof:
      - correctly attributes samples when code space gets reused (when unused code object dies and a new code objects is allocated at the same place).
      - outputs compiled machine code for instruction-level profile.
      
      Just like --perf-basic-prof, the file writer is not synchronized (even worse, there is a per-isolate file handle), so we will run into trouble with multiple isolates. However, this patch is still an improvement on --perf-basic-prof, and it should be fine to replace ll-prof.
      
      The patch also introduces experimental support for debug info, but it does not seem to be picked by the perf tool.
      
      Usage:
      
      You need the perf tool from Linux kernel >4.5. Then run:
      
      $ perf record -k mono d8 --perf-prof <your JS file>
      $ perf inject -j -i perf.data -o perf.data.jitted
      $ perf report -i perf.data.jitted
      
      Some explanations:
      The "-k mono" switch from "perf record" tells the perf tool to use the monotonic clock for perf sample timestamping. The "perf inject -j" command injects the collected code events into the perf data file, writing the output into perf.data.jitted. The perf report command then creates the report.
      
      Review URL: https://codereview.chromium.org/1809203007
      
      Cr-Commit-Position: refs/heads/master@{#35091}
      82e95f59
  24. 18 Mar, 2016 1 commit
  25. 09 Mar, 2016 1 commit
  26. 02 Mar, 2016 2 commits
  27. 26 Feb, 2016 1 commit
    • rmcilroy's avatar
      [Interpreter] Add support for cpu profiler logging. · cb29f9cd
      rmcilroy authored
      Adds support for cpu profiler logging to the interpreter. Modifies the
      the API to be passed AbstractCode objects instead of Code objects, and
      adds extra functions to AbstractCode which is required by log.cc and
      cpu-profiler.cc.
      
      The main change in sampler.cc is to determine if a stack frame is an
      interpreter stack frame, and if so, use the bytecode address as the pc
      for that frame. This allows sampling of bytecode functions. This
      requires adding support to SafeStackIterator to determine if a frame is
      interpreted, which we do by checking the PC against pre-stored addresses
      for the start and end of interpreter entry builtins.
      
      Also removes CodeDeleteEvents which are dead code and haven't
      been reported for some time.
      
      Still to do is tracking source positions which will be done in a
      followup CL.
      
      BUG=v8:4766
      LOG=N
      
      Review URL: https://codereview.chromium.org/1728593002
      
      Cr-Commit-Position: refs/heads/master@{#34321}
      cb29f9cd
  28. 15 Feb, 2016 1 commit
  29. 05 Feb, 2016 1 commit
  30. 04 Dec, 2015 1 commit
  31. 01 Dec, 2015 1 commit
  32. 30 Sep, 2015 1 commit
  33. 29 Jun, 2015 1 commit
    • Djordje.Pesic's avatar
      Assertion failure when using --log-regexp · 7be96aa2
      Djordje.Pesic authored
      RegExpCompileEvent acquieres mutex from Log class during MessageBuilder creation. LogRegExpSource, called from RegExpCompileEvent creates another MessageBuilder object which also acquires the same mutex. This mutex is not recursive, so during second acquirement, assertion fail is happening. Solution: LogRegExpSource should use the same MessageBuilder object as RegExpCompileEvent.
      
      Review URL: https://codereview.chromium.org/1207433002
      
      Cr-Commit-Position: refs/heads/master@{#29347}
      7be96aa2
  34. 29 May, 2015 1 commit
  35. 15 May, 2015 1 commit