Skip to content

Commit 95f92fd

Browse files
committed
Review comments
1 parent d3a3565 commit 95f92fd

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

ddprof-lib/src/main/cpp/vmStructs.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ void VMStructs::init_constants() {
264264
#ifdef DEBUG
265265
void VMStructs::verify_offsets() {
266266
// Hotspot only
267-
if (!VM::isHotspot()) {
267+
// NOTE: disabled for JDK25, due to a weird failure in CI
268+
if (!VM::isHotspot() || VM::java_version() == 25) {
268269
return;
269270
}
270271
int hotspot_version = VM::hotspot_version();
@@ -278,8 +279,6 @@ void VMStructs::verify_offsets() {
278279
// Verify offsets and addresses
279280
#define offset_value -1
280281
#define address_value nullptr
281-
#define off_value_value -1
282-
#define addr_value_value -1
283282

284283
// Do nothing macro
285284
#define DO_NOTHING(...)
@@ -293,8 +292,6 @@ void VMStructs::verify_offsets() {
293292
#undef DO_NOTHING
294293
#undef offset_value
295294
#undef address_value
296-
#undef off_value_value
297-
#undef addr_value_value
298295

299296
// Verify constants
300297
// Initialize constant variables to -1
@@ -321,7 +318,7 @@ void VMStructs::initOffsets() {
321318

322319
#ifdef DEBUG
323320
// Disable verifier for now
324-
// verify_offsets();
321+
verify_offsets();
325322
#endif
326323
}
327324

ddprof-lib/src/main/cpp/vmStructs.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ inline T* cast_to(const void* ptr) {
4545

4646
#define TYPE_SIZE_NAME(name) _##name##_size
4747

48-
// MATCH_SYMBOLS macro expands into an nullptr terminated char string array,
49-
// that is consumed by matchAny() method
48+
// MATCH_SYMBOLS macro expands into a string list, that is consumed by matchAny() method
5049
#define MATCH_SYMBOLS(...) std::initializer_list<const char*>{ __VA_ARGS__ }
5150

5251
/**
@@ -89,7 +88,7 @@ inline T* cast_to(const void* ptr) {
8988
* - Initialization phase
9089
* uint64_t VMStructs::_TYPE_size = 0;
9190
*
92-
* For exmaple:
91+
* For example:
9392
* f(VMClassLoaderData) -> uint64_t VMStructs::_VMClassLoaderData_size = 0;
9493
*
9594
* - Value population phase
@@ -197,7 +196,7 @@ typedef void* address;
197196
field(_osthread_id_offset, offset, MATCH_SYMBOLS("_thread_id")) \
198197
field_with_version(_osthread_state_offset, offset, 10, MAX_VERSION, MATCH_SYMBOLS("_state")) \
199198
type_end() \
200-
type_begin(VMThreadShow, MATCH_SYMBOLS("ThreadShadow")) \
199+
type_begin(VMThreadShadow, MATCH_SYMBOLS("ThreadShadow")) \
201200
field(_thread_exception_offset, offset, MATCH_SYMBOLS("_exception_file")) \
202201
type_end() \
203202
type_begin(VMCompilerThread, MATCH_SYMBOLS("CompilerThread")) \

0 commit comments

Comments
 (0)