Skip to content

Commit

Permalink
Adjust output a bit, print xrun agents too
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Dec 16, 2024
1 parent fa960c8 commit 48b0498
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/prims/jvmtiAgentList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class JvmtiAgentList : AllStatic {
private:
static JvmtiAgent* _list;

static Iterator all();
static void initialize();
static void convert_xrun_agents();

Expand All @@ -82,6 +81,7 @@ class JvmtiAgentList : AllStatic {

static JvmtiAgent* lookup(JvmtiEnv* env, void* f_ptr);

static Iterator all();
static Iterator agents() NOT_JVMTI({ Iterator it; return it; });
static Iterator java_agents();
static Iterator native_agents();
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/runtime/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,14 +1124,15 @@ void os::print_environment_variables(outputStream* st, const char** env_list) {

void os::print_jvmti_agent_info(outputStream* st) {
#if INCLUDE_JVMTI
// should return all kinds of JVMTI agents, but no xrun agents
const JvmtiAgentList::Iterator it = JvmtiAgentList::agents();
bool first_agent = true;
const JvmtiAgentList::Iterator it = JvmtiAgentList::all();
if (it.has_next()) {
st->print_cr("JVMTI agents:");
} else {
st->print_cr("JVMTI agents: none");
}
while (it.has_next()) {
const JvmtiAgent* agent = it.next();
if (agent != nullptr) {
if (first_agent) st->print_cr("JVMTI agents:");
first_agent = false;
const char* dyninfo = agent->is_dynamic() ? "dynamic" : "";
const char* instrumentinfo = agent->is_instrument_lib() ? "instrumentlib" : "";
const char* loadinfo = agent->is_loaded() ? "loaded" : "not loaded";
Expand All @@ -1140,7 +1141,6 @@ void os::print_jvmti_agent_info(outputStream* st) {
const char* pathinfo = agent->os_lib_path();
if (optionsinfo == nullptr) optionsinfo = "none";
if (pathinfo == nullptr) pathinfo = "none";
// jplis output too?
st->print_cr("%s path:%s, %s, %s %s %s options:%s", agent->name(), pathinfo, loadinfo, initinfo, dyninfo, instrumentinfo, optionsinfo);
}
}
Expand Down

0 comments on commit 48b0498

Please sign in to comment.