diff options
author | Peter Marshall <p.s.marshall0@gmail.com> | 2018-07-30 13:54:55 +0200 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2018-09-03 19:49:07 +0200 |
commit | 8ac662eb4dddde40b0ecfe278ea7fb55b580e4a8 (patch) | |
tree | 92f205d00f6b4efbad12456d44597f2305d25670 /deps/v8/include | |
parent | 120814b15c697d7ce5463430935e084359442707 (diff) | |
download | android-node-v8-8ac662eb4dddde40b0ecfe278ea7fb55b580e4a8.tar.gz android-node-v8-8ac662eb4dddde40b0ecfe278ea7fb55b580e4a8.tar.bz2 android-node-v8-8ac662eb4dddde40b0ecfe278ea7fb55b580e4a8.zip |
deps: backport 4 CPU profiler commits from upstream V8
[cpu-profiler] Add a new profiling mode with a more detailed call tree.
https://chromium.googlesource.com/v8/v8.git/+/ecae80cdb350dde1e654c531b56f5b6c44dc8c77
[cpu-profiler] Reuse free slots in code_entries_
https://chromium.googlesource.com/v8/v8.git/+/3e1126bf15e62c433c4e9cb21316d182f691c63a
[cpu-profiler] Only store deopt inline frames for functions that need it
https://chromium.googlesource.com/v8/v8.git/+/0bfcbdd4726920755e51dab28c18ab93e050819b
[cpu-profiler] Use instruction start as the key for the CodeMap
https://chromium.googlesource.com/v8/v8.git/+/ba752ea4c50713dff1e94f45a79db3ba968a8d66
PR-URL: https://github.com/nodejs/node/pull/22028
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>
Diffstat (limited to 'deps/v8/include')
-rw-r--r-- | deps/v8/include/v8-profiler.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index bcb53f1446..af36aa6d2d 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -277,6 +277,16 @@ class V8_EXPORT CpuProfile { void Delete(); }; +enum CpuProfilingMode { + // In the resulting CpuProfile tree, intermediate nodes in a stack trace + // (from the root to a leaf) will have line numbers that point to the start + // line of the function, rather than the line of the callsite of the child. + kLeafNodeLineNumbers, + // In the resulting CpuProfile tree, nodes are separated based on the line + // number of their callsite in their parent. + kCallerLineNumbers, +}; + /** * Interface for controlling CPU profiling. Instance of the * profiler can be created using v8::CpuProfiler::New method. @@ -320,6 +330,13 @@ class V8_EXPORT CpuProfiler { * |record_samples| parameter controls whether individual samples should * be recorded in addition to the aggregated tree. */ + void StartProfiling(Local<String> title, CpuProfilingMode mode, + bool record_samples = false); + /** + * The same as StartProfiling above, but the CpuProfilingMode defaults to + * kLeafNodeLineNumbers mode, which was the previous default behavior of the + * profiler. + */ void StartProfiling(Local<String> title, bool record_samples = false); /** |