summaryrefslogtreecommitdiff
path: root/deps/v8/src/profiler/profile-generator.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2022-04-12 11:10:15 +0200
committerMichaël Zasso <targos@protonmail.com>2022-04-12 22:08:39 +0200
commitfd4f80ce54d7f7b7503e0999f6a9d293d493846d (patch)
tree00fba34b8aabeb481c7128fccee635719ee44a3b /deps/v8/src/profiler/profile-generator.cc
parent73d53fe9f56d7ce5de4b9c9ad5257dc601bbce14 (diff)
downloadnode-new-fd4f80ce54d7f7b7503e0999f6a9d293d493846d.tar.gz
deps: update V8 to 10.1.124.6
PR-URL: https://github.com/nodejs/node/pull/42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'deps/v8/src/profiler/profile-generator.cc')
-rw-r--r--deps/v8/src/profiler/profile-generator.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/deps/v8/src/profiler/profile-generator.cc b/deps/v8/src/profiler/profile-generator.cc
index 1a4665b874..fc7e080f37 100644
--- a/deps/v8/src/profiler/profile-generator.cc
+++ b/deps/v8/src/profiler/profile-generator.cc
@@ -578,7 +578,7 @@ CpuProfile::CpuProfile(CpuProfiler* profiler, const char* title,
: title_(title),
options_(options),
delegate_(std::move(delegate)),
- start_time_(base::TimeTicks::HighResolutionNow()),
+ start_time_(base::TimeTicks::Now()),
top_down_(profiler->isolate(), profiler->code_entries()),
profiler_(profiler),
streaming_next_sample_(0),
@@ -750,7 +750,7 @@ void CpuProfile::StreamPendingTraceEvents() {
}
void CpuProfile::FinishProfile() {
- end_time_ = base::TimeTicks::HighResolutionNow();
+ end_time_ = base::TimeTicks::Now();
// Stop tracking context movements after profiling stops.
context_filter_.set_native_context_address(kNullAddress);
StreamPendingTraceEvents();
@@ -1005,6 +1005,13 @@ void CpuProfilesCollection::AddPathToCurrentProfiles(
bool accepts_context = context_filter.Accept(native_context_address);
bool accepts_embedder_context =
context_filter.Accept(embedder_native_context_address);
+
+ // if FilterContext is set, do not propagate StateTag if not accepted.
+ // GC is exception because native context address is guaranteed to be empty.
+ DCHECK(state != StateTag::GC || native_context_address == kNullAddress);
+ if (!accepts_context && state != StateTag::GC) {
+ state = StateTag::IDLE;
+ }
profile->AddPath(timestamp, accepts_context ? path : empty_path, src_line,
update_stats, sampling_interval, state,
accepts_embedder_context ? embedder_state_tag