Skip to content

Commit 41b4c19

Browse files
author
Xin Liu
committed
8271353: PerfDataManager::destroy crashes in VM_Exit
Reviewed-by: dholmes, stuefe, minqi
1 parent 357947a commit 41b4c19

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hotspot/share/runtime/perfData.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -277,7 +277,8 @@ void PerfDataManager::destroy() {
277277
os::naked_short_sleep(1); // 1ms sleep to let other thread(s) run
278278

279279
log_debug(perf, datacreation)("Total = %d, Sampled = %d, Constants = %d",
280-
_all->length(), _sampled->length(), _constants->length());
280+
_all->length(), _sampled == NULL ? 0 : _sampled->length(),
281+
_constants == NULL ? 0 : _constants->length());
281282

282283
for (int index = 0; index < _all->length(); index++) {
283284
PerfData* p = _all->at(index);

0 commit comments

Comments
 (0)