MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / testFlow3

Function testFlow3

test/test/nonjava/non_java_app.cpp:285–309  ·  view source on GitHub ↗

Here is the flow of the test: 1. Load the profiler 2. Load the JVM library 3. Start the profiler 4. Start the JVM 5. Execute the JVM task 6. Stop the profiler 7. Start the profiler 8. Execute the JVM task 9. Stop the profiler 10. Stop the JVM Expected output: The profiler will not be able to sample JVM stacks correctly during the first session, but it will do during the second session. Explanati

Source from the content-addressed store, hash-verified

283before the first session, but it is started before the second session.
284*/
285void testFlow3(int argc, char** argv) {
286 validateArgsCount(argc, 4);
287
288 loadProfiler();
289
290 loadJvmLib();
291
292 startProfiler();
293
294 startJvm();
295
296 nativeBurnCpu();
297 executeJvmTask();
298
299 stopProfiler(argv[2]);
300
301 startProfiler();
302
303 nativeBurnCpu();
304 executeJvmTask();
305
306 stopProfiler(argv[3]);
307
308 stopJvm();
309}
310
311void* jvmThreadWrapper(void* arg) {
312 loadJvmLib();

Callers 1

mainFunction · 0.85

Calls 9

validateArgsCountFunction · 0.85
loadProfilerFunction · 0.85
loadJvmLibFunction · 0.85
startProfilerFunction · 0.85
startJvmFunction · 0.85
nativeBurnCpuFunction · 0.85
executeJvmTaskFunction · 0.85
stopProfilerFunction · 0.85
stopJvmFunction · 0.85

Tested by

no test coverage detected