[Counters] Add HistorgramTimers for optimized compile.
Will be used for UMA to track time spent optimizing code in the wild. Change-Id: Ibc01540552eac4cb9224f1cb6cc11a55aae5834d Reviewed-on: https://chromium-review.googlesource.com/444345 Reviewed-by: Michael Stanton <mvstanton@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#43374}
This commit is contained in:
parent
5004748868
commit
8307ab709d
@ -50,6 +50,8 @@ class OptimizingCompileDispatcher::CompileTask : public v8::Task {
|
||||
DisallowHandleDereference no_deref;
|
||||
|
||||
{
|
||||
HistogramTimerScope histogram_timer(
|
||||
isolate_->counters()->compile_optimized_background_thread());
|
||||
TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_);
|
||||
|
||||
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
||||
|
@ -874,6 +874,8 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
|
||||
return MaybeHandle<Code>();
|
||||
}
|
||||
|
||||
HistogramTimerScope timer(
|
||||
isolate->counters()->compile_optimized_main_thread());
|
||||
TimerEventScope<TimerEventOptimizeCode> optimize_code_timer(isolate);
|
||||
RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::OptimizeCode);
|
||||
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode");
|
||||
@ -928,6 +930,8 @@ CompilationJob::Status FinalizeOptimizedCompilationJob(CompilationJob* job) {
|
||||
CompilationInfo* info = job->info();
|
||||
Isolate* isolate = info->isolate();
|
||||
|
||||
HistogramTimerScope histogram_timer(
|
||||
isolate->counters()->compile_optimized_main_thread());
|
||||
TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate());
|
||||
RuntimeCallTimerScope runtimeTimer(isolate,
|
||||
&RuntimeCallStats::RecompileSynchronous);
|
||||
|
@ -969,6 +969,11 @@ class RuntimeCallTimerScope {
|
||||
HT(compile_serialize, V8.CompileSerializeMicroSeconds, 100000, MICROSECOND) \
|
||||
HT(compile_deserialize, V8.CompileDeserializeMicroSeconds, 1000000, \
|
||||
MICROSECOND) \
|
||||
/* Optimized compile times. */ \
|
||||
HT(compile_optimized_main_thread, V8.CompileOptimizedMainThreadMicroSeconds, \
|
||||
1000000, MICROSECOND) \
|
||||
HT(compile_optimized_background_thread, \
|
||||
V8.CompileOptimizeBackgroundThreadMicroSeconds, 1000000, MICROSECOND) \
|
||||
/* Total compilation time incl. caching/parsing */ \
|
||||
HT(compile_script, V8.CompileScriptMicroSeconds, 1000000, MICROSECOND) \
|
||||
/* Total JavaScript execution time (including callbacks and runtime calls */ \
|
||||
|
Loading…
Reference in New Issue
Block a user