Index: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp |
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp |
index 675101a641777e58a9c95989725c3d43b9668423..ff93b8d7bd78379aa29bdfd9178db34c2c4738a9 100644 |
--- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp |
+++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp |
@@ -33,6 +33,7 @@ |
#include "wtf/Vector.h" |
#include "wtf/text/TextPosition.h" |
#include <inttypes.h> |
+#include <v8-profiler.h> |
#include <v8.h> |
namespace blink { |
@@ -52,9 +53,13 @@ void setCallStack(TracedValue* value) |
traceCategoryEnabled = TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack")); |
if (!*traceCategoryEnabled) |
return; |
- RefPtr<ScriptCallStack> scriptCallStack = currentScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture); |
+ // The CPU profiler stack trace does not include call site line numbers. |
+ // So we collect the top frame with the currentScriptCallStack to get the |
+ // binding call site info. |
+ RefPtr<ScriptCallStack> scriptCallStack = currentScriptCallStack(1); |
caseq
2016/01/27 23:03:56
nit: put under if ()
alph
2016/01/27 23:16:20
Done.
|
if (scriptCallStack) |
scriptCallStack->toTracedValue(value, "stackTrace"); |
+ v8::Isolate::GetCurrent()->GetCpuProfiler()->CollectSample(); |
} |
namespace { |