From f57c7223cf9b732db5255b3e394ee07ff741f074 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Tue, 30 Jan 2024 18:10:25 +0000 Subject: [PATCH] 8324880: Rename get_stack_trace.h Reviewed-by: dholmes, jwaters, sspitsyn --- .../libGetStackTraceAndRetransformTest.cpp | 2 +- .../libGetStackTraceCurrentThreadTest.cpp | 2 +- .../{get_stack_trace.h => get_stack_trace.hpp} | 14 +++++++------- .../GetStackTrace/getstacktr03/libgetstacktr03.cpp | 2 +- .../GetStackTrace/getstacktr04/libgetstacktr04.cpp | 2 +- .../GetStackTrace/getstacktr05/libgetstacktr05.cpp | 2 +- .../GetStackTrace/getstacktr06/libgetstacktr06.cpp | 2 +- .../GetStackTrace/getstacktr07/libgetstacktr07.cpp | 2 +- .../GetStackTrace/getstacktr08/libgetstacktr08.cpp | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) rename test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/{get_stack_trace.h => get_stack_trace.hpp} (90%) diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceAndRetransformTest/libGetStackTraceAndRetransformTest.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceAndRetransformTest/libGetStackTraceAndRetransformTest.cpp index 8968a6cc57d..eea96df83f7 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceAndRetransformTest/libGetStackTraceAndRetransformTest.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceAndRetransformTest/libGetStackTraceAndRetransformTest.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceCurrentThreadTest/libGetStackTraceCurrentThreadTest.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceCurrentThreadTest/libGetStackTraceCurrentThreadTest.cpp index 36e8663bb86..17e721a151e 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceCurrentThreadTest/libGetStackTraceCurrentThreadTest.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceCurrentThreadTest/libGetStackTraceCurrentThreadTest.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.hpp similarity index 90% rename from test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h rename to test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.hpp index 788d3dd123c..d7c85704275 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.h +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/get_stack_trace.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,8 +21,8 @@ * questions. */ -#ifndef GET_STACK_TRACE_H -#define GET_STACK_TRACE_H +#ifndef GET_STACK_TRACE_HPP +#define GET_STACK_TRACE_HPP #include "jvmti.h" typedef struct { @@ -81,18 +81,18 @@ int compare_stack_trace(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, lambda_idx = lambda - expected_frames[exp_idx].cls; printf("Comparing only first %zu chars in classname.\n", lambda_idx); } - if (class_signature == NULL || strncmp(class_signature, expected_frames[exp_idx].cls, lambda_idx) != 0) { + if (class_signature == nullptr || strncmp(class_signature, expected_frames[exp_idx].cls, lambda_idx) != 0) { printf("(frame#%d) wrong class sig: \"%s\", expected: \"%s\"\n", exp_idx, class_signature, expected_frames[exp_idx].cls); result = JNI_FALSE; } - if (name == NULL || strcmp(name, expected_frames[exp_idx].name) != 0) { + if (name == nullptr || strcmp(name, expected_frames[exp_idx].name) != 0) { printf("(frame#%d) wrong method name: \"%s\", expected: \"%s\"\n", exp_idx, name, expected_frames[exp_idx].name); result = JNI_FALSE; } - if (sig == NULL || strcmp(sig, expected_frames[exp_idx].sig) != 0) { + if (sig == nullptr || strcmp(sig, expected_frames[exp_idx].sig) != 0) { printf("(frame#%d) wrong method sig: \"%s\", expected: \"%s\"\n", exp_idx, sig, expected_frames[exp_idx].sig); result = JNI_FALSE; @@ -103,4 +103,4 @@ int compare_stack_trace(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, } -#endif //GET_STACK_TRACE_H +#endif //GET_STACK_TRACE_HPP diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr03/libgetstacktr03.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr03/libgetstacktr03.cpp index a0ae45613d2..51c6f5dc4c4 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr03/libgetstacktr03.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr03/libgetstacktr03.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr04/libgetstacktr04.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr04/libgetstacktr04.cpp index 9ef19122ec1..0cdbb7d0271 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr04/libgetstacktr04.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr04/libgetstacktr04.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr05/libgetstacktr05.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr05/libgetstacktr05.cpp index 062e4b679e3..19c6eb3967e 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr05/libgetstacktr05.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr05/libgetstacktr05.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr06/libgetstacktr06.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr06/libgetstacktr06.cpp index e72dc0c171f..f0f17d50b17 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr06/libgetstacktr06.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr06/libgetstacktr06.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr07/libgetstacktr07.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr07/libgetstacktr07.cpp index 2c3af86c5e5..baa5f8e90d9 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr07/libgetstacktr07.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr07/libgetstacktr07.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" { diff --git a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr08/libgetstacktr08.cpp b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr08/libgetstacktr08.cpp index 8b293a9e559..c3f6ad667b1 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr08/libgetstacktr08.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/getstacktr08/libgetstacktr08.cpp @@ -25,7 +25,7 @@ #include #include "jvmti.h" #include "jvmti_common.h" -#include "../get_stack_trace.h" +#include "../get_stack_trace.hpp" extern "C" {