Skip to content

Commit 80f3969

Browse files
qinsoonk-sareen
authored andcommitted
Print third-party heap version in -Xinternalversion and error report. (#14)
1 parent 4f65a98 commit 80f3969

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/hotspot/share/runtime/arguments.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
#if INCLUDE_JFR
6565
#include "jfr/jfr.hpp"
6666
#endif
67+
#ifdef INCLUDE_THIRD_PARTY_HEAP
68+
#include THIRD_PARTY_HEAP_FILE(thirdPartyHeap.hpp)
69+
#endif
6770

6871
#define DEFAULT_JAVA_LAUNCHER "generic"
6972

@@ -2705,6 +2708,11 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
27052708
} else if (match_option(option, "-Xinternalversion")) {
27062709
jio_fprintf(defaultStream::output_stream(), "%s\n",
27072710
VM_Version::internal_vm_info_string());
2711+
#ifdef INCLUDE_THIRD_PARTY_HEAP
2712+
jio_fprintf(defaultStream::output_stream(), "%s\n",
2713+
ThirdPartyHeap::version());
2714+
#endif
2715+
27082716
vm_exit(0);
27092717
#ifndef PRODUCT
27102718
// -Xprintflags

src/hotspot/share/utilities/vmError.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
#if INCLUDE_JFR
5656
#include "jfr/jfr.hpp"
5757
#endif
58+
#ifdef INCLUDE_THIRD_PARTY_HEAP
59+
#include THIRD_PARTY_HEAP_FILE(thirdPartyHeap.hpp)
60+
#endif
5861

5962
#ifndef PRODUCT
6063
#include <signal.h>
@@ -1031,6 +1034,9 @@ void VMError::report(outputStream* st, bool _verbose) {
10311034

10321035
if (_verbose) {
10331036
st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
1037+
#ifdef INCLUDE_THIRD_PARTY_HEAP
1038+
st->print_cr("heap_info: %s", ThirdPartyHeap::version());
1039+
#endif
10341040
st->cr();
10351041
}
10361042

0 commit comments

Comments
 (0)