File tree Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ react_library(
117
117
'JSCLegacyTracing.cpp' ,
118
118
'JSCMemory.cpp' ,
119
119
'JSCPerfStats.cpp' ,
120
+ 'JSCSamplingProfiler.cpp' ,
120
121
'JSCTracing.cpp' ,
121
122
'JSCWebWorker.cpp' ,
122
123
'MethodCall.cpp' ,
@@ -130,6 +131,7 @@ react_library(
130
131
'JSCLegacyTracing.h' ,
131
132
'JSCMemory.h' ,
132
133
'JSCPerfStats.h' ,
134
+ 'JSCSamplingProfiler.h' ,
133
135
'JSCTracing.h' ,
134
136
],
135
137
exported_headers = [
Original file line number Diff line number Diff line change 20
20
#include " SystraceSection.h"
21
21
#include " Value.h"
22
22
23
+ #include " JSCSamplingProfiler.h"
24
+
23
25
#if defined(WITH_JSC_EXTRA_TRACING) || DEBUG
24
26
#include " JSCTracing.h"
25
27
#endif
@@ -223,6 +225,8 @@ void JSCExecutor::initOnJSVMThread() throw(JSException) {
223
225
addNativeProfilingHooks (m_context);
224
226
addNativeTracingLegacyHooks (m_context);
225
227
PerfLogging::installNativeHooks (m_context);
228
+
229
+ initSamplingProfilerOnMainJSCThread (m_context);
226
230
#endif
227
231
228
232
#ifdef WITH_FB_MEMORY_PROFILING
Original file line number Diff line number Diff line change
1
+ // Copyright 2004-present Facebook. All Rights Reserved.
2
+
3
+ #ifdef WITH_JSC_EXTRA_TRACING
4
+
5
+ #include " JSCSamplingProfiler.h"
6
+
7
+ #include < JavaScriptCore/API/JSProfilerPrivate.h>
8
+
9
+ namespace facebook {
10
+ namespace react {
11
+
12
+ void initSamplingProfilerOnMainJSCThread (JSGlobalContextRef ctx) {
13
+ JSStartSamplingProfilingOnMainJSCThread (ctx);
14
+ }
15
+
16
+ }
17
+ }
18
+
19
+ #endif // WITH_JSC_EXTRA_TRACING
Original file line number Diff line number Diff line change
1
+ // Copyright 2004-present Facebook. All Rights Reserved.
2
+
3
+ #pragma once
4
+
5
+ #ifdef WITH_JSC_EXTRA_TRACING
6
+
7
+ #include < JavaScriptCore/JSContextRef.h>
8
+
9
+ namespace facebook {
10
+ namespace react {
11
+
12
+ void initSamplingProfilerOnMainJSCThread (JSGlobalContextRef ctx);
13
+ }
14
+ }
15
+
16
+ #endif // WITH_JSC_EXTRA_TRACING
You can’t perform that action at this time.
0 commit comments