Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions ddprof-lib/src/main/cpp/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,16 +1016,11 @@ Engine *Profiler::selectCpuEngine(Arguments &args) {
return &noop_engine;
} else if (args._cpu >= 0 || strcmp(args._event, EVENT_CPU) == 0) {
if (VM::isOpenJ9()) {
if (!J9Ext::can_use_ASGCT()) {
if (!J9Ext::is_jvmti_jmethodid_safe()) {
Log::warn("Safe jmethodID access is not available on this JVM. Using "
"CPU profiler on your own risk.");
}
return &j9_engine;
} else if (!J9Ext::is_jmethodid_safe()) {
if (!J9Ext::is_jvmti_jmethodid_safe()) {
Log::warn("Safe jmethodID access is not available on this JVM. Using "
"CPU profiler on your own risk.");
}
return &j9_engine;
}
return !ctimer.check(args)
? (Engine *)&ctimer
Expand All @@ -1048,16 +1043,15 @@ Engine *Profiler::selectWallEngine(Arguments &args) {
return &noop_engine;
}
if (VM::isOpenJ9()) {
if (!J9Ext::can_use_ASGCT()) {
if (args._wallclock_sampler == JVMTI) {
if (!J9Ext::is_jvmti_jmethodid_safe()) {
Log::warn("Safe jmethodID access is not available on this JVM. Using "
"wallclock profiler on your own risk.");
}
j9_engine.sampleIdleThreads();
return (Engine *)&j9_engine;
} else if (!J9Ext::is_jmethodid_safe()) {
Log::warn("Safe jmethodID access is not available on this JVM. Using "
"wallclock profiler on your own risk.");
} else {
return (Engine *)&wall_asgct_engine;
}
}
switch (args._wallclock_sampler) {
Expand Down
Loading