Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: runtime/vm/profiler_macos.cc

Issue 78713003: Attempt at enabling profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/profiler_macos.cc
diff --git a/runtime/vm/profiler_macos.cc b/runtime/vm/profiler_macos.cc
index 7f5fad4a7e738cd932d9443ddb9b0132329044b6..2cb31c6b0f87dd2e17120916f7516fa29927096e 100644
--- a/runtime/vm/profiler_macos.cc
+++ b/runtime/vm/profiler_macos.cc
@@ -29,7 +29,7 @@ static void CollectSample(IsolateProfilerData* profiler_data,
sample->vm_tags = Sample::kExecuting;
sample->runtime_tags = 0;
int64_t cpu_usage = 0;
- // TODO(johnmccutchan): Thread::GetThreadCpuUsage on MacOS.
+ Thread::GetThreadCpuUsage(profiler_data->thread_id(), &cpu_usage);
sample->cpu_usage = profiler_data->ComputeDeltaAndSetCpuUsage(cpu_usage);
ProfilerSampleStackWalker stackWalker(sample, stack_lower, stack_upper,
pc, fp, sp);

Powered by Google App Engine
This is Rietveld 408576698