@@ -1047,7 +1047,7 @@ bool ExecuteCompilationUnits(
10471047 const std::shared_ptr<BackgroundCompileToken>& token, Counters* counters,
10481048 int task_id, CompileBaselineOnly baseline_only) {
10491049 TRACE_COMPILE (" Compiling (task %d)...\n " , task_id);
1050- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT ( " v8.wasm" ) , " ExecuteCompilationUnits" );
1050+ TRACE_EVENT0 (" v8.wasm" , " wasm. ExecuteCompilationUnits" );
10511051
10521052 // Execute JS to Wasm wrapper units first, so that they are ready to be
10531053 // finalized by the main thread when the kFinishedBaselineCompilation event is
@@ -1108,8 +1108,9 @@ bool ExecuteCompilationUnits(
11081108
11091109 auto publish_results = [&results_to_publish](
11101110 BackgroundCompileScope* compile_scope) {
1111- TRACE_EVENT1 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ), " PublishResults" ,
1112- " num_results" , results_to_publish.size ());
1111+ TRACE_EVENT1 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed" ),
1112+ " wasm.PublishCompilationResults" , " num_results" ,
1113+ results_to_publish.size ());
11131114 if (results_to_publish.empty ()) return ;
11141115 std::vector<std::unique_ptr<WasmCode>> unpublished_code =
11151116 compile_scope->native_module ()->AddCompiledCode (
@@ -1512,7 +1513,8 @@ AsyncCompileJob::AsyncCompileJob(
15121513 bytes_copy_(std::move(bytes_copy)),
15131514 wire_bytes_(bytes_copy_.get(), bytes_copy_.get() + length),
15141515 resolver_(std::move(resolver)) {
1515- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ), " new AsyncCompileJob" );
1516+ TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed" ),
1517+ " wasm.AsyncCompileJob" );
15161518 CHECK (FLAG_wasm_async_compilation);
15171519 CHECK (!FLAG_jitless);
15181520 v8::Isolate* v8_isolate = reinterpret_cast <v8::Isolate*>(isolate);
@@ -1660,8 +1662,8 @@ void AsyncCompileJob::PrepareRuntimeObjects() {
16601662// This function assumes that it is executed in a HandleScope, and that a
16611663// context is set on the isolate.
16621664void AsyncCompileJob::FinishCompile (bool is_after_cache_hit) {
1663- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ),
1664- " AsyncCompileJob::FinishCompile " );
1665+ TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed " ),
1666+ " wasm.FinishAsyncCompile " );
16651667 bool is_after_deserialization = !module_object_.is_null ();
16661668 auto compilation_state = Impl (native_module_->compilation_state ());
16671669 if (!is_after_deserialization) {
@@ -1693,7 +1695,8 @@ void AsyncCompileJob::FinishCompile(bool is_after_cache_hit) {
16931695 script->set_source_mapping_url (*src_map_str.ToHandleChecked ());
16941696 }
16951697 {
1696- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ), " Debug::OnAfterCompile" );
1698+ TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed" ),
1699+ " wasm.Debug.OnAfterCompile" );
16971700 isolate_->debug ()->OnAfterCompile (script);
16981701 }
16991702
@@ -1740,8 +1743,8 @@ void AsyncCompileJob::AsyncCompileFailed() {
17401743}
17411744
17421745void AsyncCompileJob::AsyncCompileSucceeded (Handle<WasmModuleObject> result) {
1743- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ),
1744- " CompilationResultResolver:: OnCompilationSucceeded" );
1746+ TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed " ),
1747+ " wasm. OnCompilationSucceeded" );
17451748 resolver_->OnCompilationSucceeded (result);
17461749}
17471750
@@ -1938,8 +1941,8 @@ class AsyncCompileJob::DecodeModule : public AsyncCompileJob::CompileStep {
19381941 DisallowHeapAllocation no_allocation;
19391942 // Decode the module bytes.
19401943 TRACE_COMPILE (" (1) Decoding module...\n " );
1941- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ),
1942- " AsyncCompileJob:: DecodeModule" );
1944+ TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed " ),
1945+ " wasm. DecodeModule" );
19431946 auto enabled_features = job->enabled_features_ ;
19441947 result = DecodeWasmModule (enabled_features, job->wire_bytes_ .start (),
19451948 job->wire_bytes_ .end (), false , kWasmOrigin ,
@@ -2446,6 +2449,7 @@ void AsyncStreamingProcessor::OnAbort() {
24462449
24472450bool AsyncStreamingProcessor::Deserialize (Vector<const uint8_t > module_bytes,
24482451 Vector<const uint8_t > wire_bytes) {
2452+ TRACE_EVENT0 (" v8.wasm" , " wasm.Deserialize" );
24492453 // DeserializeNativeModule and FinishCompile assume that they are executed in
24502454 // a HandleScope, and that a context is set on the isolate.
24512455 HandleScope scope (job_->isolate_ );
@@ -2690,8 +2694,9 @@ void CompilationStateImpl::FinalizeJSToWasmWrappers(
26902694 // TODO(6792): Wrappers below are allocated with {Factory::NewCode}. As an
26912695 // optimization we keep the code space unlocked to avoid repeated unlocking
26922696 // because many such wrapper are allocated in sequence below.
2693- TRACE_EVENT1 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ), " FinalizeJSToWasmWrappers" ,
2694- " num_wrappers" , js_to_wasm_wrapper_units_.size ());
2697+ TRACE_EVENT1 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed" ),
2698+ " wasm.FinalizeJSToWasmWrappers" , " num_wrappers" ,
2699+ js_to_wasm_wrapper_units_.size ());
26952700 CodeSpaceMemoryModificationScope modification_scope (isolate->heap ());
26962701 for (auto & unit : js_to_wasm_wrapper_units_) {
26972702 Handle<Code> code = unit->Finalize (isolate);
@@ -2709,8 +2714,8 @@ CompilationStateImpl::GetNextCompilationUnit(
27092714}
27102715
27112716void CompilationStateImpl::OnFinishedUnits (Vector<WasmCode*> code_vector) {
2712- TRACE_EVENT1 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm" ), " OnFinishedUnits " ,
2713- " num_units" , code_vector.size ());
2717+ TRACE_EVENT1 (TRACE_DISABLED_BY_DEFAULT (" v8.wasm.detailed " ) ,
2718+ " wasm.OnFinishedUnits " , " num_units" , code_vector.size ());
27142719
27152720 base::MutexGuard guard (&callbacks_mutex_);
27162721
@@ -2833,13 +2838,13 @@ void CompilationStateImpl::TriggerCallbacks(
28332838
28342839 for (auto event :
28352840 {std::make_pair (CompilationEvent::kFinishedBaselineCompilation ,
2836- " BaselineFinished" ),
2841+ " wasm. BaselineFinished" ),
28372842 std::make_pair (CompilationEvent::kFinishedTopTierCompilation ,
2838- " TopTierFinished" ),
2843+ " wasm. TopTierFinished" ),
28392844 std::make_pair (CompilationEvent::kFinishedRecompilation ,
2840- " RecompilationFinished" )}) {
2845+ " wasm. RecompilationFinished" )}) {
28412846 if (!triggered_events.contains (event.first )) continue ;
2842- TRACE_EVENT0 (TRACE_DISABLED_BY_DEFAULT ( " v8.wasm" ) , event.second );
2847+ TRACE_EVENT0 (" v8.wasm" , event.second );
28432848 for (auto & callback : callbacks_) {
28442849 callback (event.first );
28452850 }
0 commit comments