Here is the flow of the test: 1. Load the profiler 2. Load the JVM library 3. Start the JVM on a different thread 4. Start the profiler 5. Execute the JVM task 6. Stop the profiler 7. Stop the JVM Expected output: The profiler should be able to profile the JVM task. Explanation: The same as flow 1, except that profiler will have to attach the caller thread to the JVM. */
| 335 | The same as flow 1, except that profiler will have to attach the caller thread to the JVM. |
| 336 | */ |
| 337 | void testFlow4(int argc, char** argv) { |
| 338 | struct timespec wait_time = {(time_t)(2), 0L}; |
| 339 | |
| 340 | loadProfiler(); |
| 341 | |
| 342 | pthread_t thread; |
| 343 | pthread_create(&thread, NULL, jvmThreadWrapper, NULL); |
| 344 | |
| 345 | nanosleep(&wait_time, NULL); |
| 346 | |
| 347 | startProfiler(); |
| 348 | |
| 349 | nanosleep(&wait_time, NULL); |
| 350 | |
| 351 | stopProfiler(argv[2]); |
| 352 | } |
| 353 | |
| 354 | int main(int argc, char** argv) { |
| 355 | validateArgsCount(argc, 3); |
no test coverage detected