< prev index next > test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp
Print this page
/*
! * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, Google 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
* under the terms of the GNU General Public License version 2 only, as
/*
! * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, Google 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
* under the terms of the GNU General Public License version 2 only, as
jlong size) {
jvmtiFrameInfo frames[64];
jint count;
jvmtiError err;
+ if (jni->IsValueObject(object)) {
+ // weak references are prohibited for value objects, skip them
+ return;
+ }
+
err = jvmti->GetStackTrace(thread, 0, 64, frames, &count);
if (err == JVMTI_ERROR_NONE && count >= 1) {
ObjectTrace* live_object;
jvmtiFrameInfo* allocated_frames = (jvmtiFrameInfo*) malloc(count * sizeof(*allocated_frames));
memcpy(allocated_frames, frames, count * sizeof(*allocated_frames));
< prev index next >