Skip to content

Commit 58428c0

Browse files
committed
use :: as class / method separator
1 parent 78beef4 commit 58428c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/c/perf-map-agent.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void class_name_from_sig(char *dest, size_t dest_size, const char *sig) {
7474

7575
static void sig_string(jvmtiEnv *jvmti, jmethodID method, char *output, size_t noutput) {
7676
char *sourcefile = NULL;
77-
char *name = NULL;
77+
char *method_name = NULL;
7878
char *msig = NULL;
7979
char *csig = NULL;
8080
char *empty = "";
@@ -86,7 +86,7 @@ static void sig_string(jvmtiEnv *jvmti, jmethodID method, char *output, size_t n
8686

8787
strncpy(output, "<error writing signature>", noutput);
8888

89-
if (!(*jvmti)->GetMethodName(jvmti, method, &name, &msig, NULL)) {
89+
if (!(*jvmti)->GetMethodName(jvmti, method, &method_name, &msig, NULL)) {
9090
if (!(*jvmti)->GetMethodDeclaringClass(jvmti, method, &class) &&
9191
!(*jvmti)->GetClassSignature(jvmti, class, &csig, NULL)) {
9292

@@ -111,11 +111,11 @@ static void sig_string(jvmtiEnv *jvmti, jmethodID method, char *output, size_t n
111111

112112
char class_name[STRING_BUFFER_SIZE];
113113
class_name_from_sig(class_name, sizeof(class_name), csig);
114-
snprintf(output, noutput, "%s.%s%s%s", class_name, name, method_signature, source_info);
114+
snprintf(output, noutput, "%s::%s%s%s", class_name, method_name, method_signature, source_info);
115115

116116
if (csig != NULL) (*jvmti)->Deallocate(jvmti, csig);
117117
}
118-
if (name != NULL) (*jvmti)->Deallocate(jvmti, name);
118+
if (method_name != NULL) (*jvmti)->Deallocate(jvmti, method_name);
119119
if (msig != NULL) (*jvmti)->Deallocate(jvmti, msig);
120120
}
121121
}

0 commit comments

Comments
 (0)