mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-28 08:39:56 +00:00
8283456: Make CompiledICHolder::live_count/live_not_claimed_count debug only
Reviewed-by: dholmes
This commit is contained in:
parent
85628a871d
commit
c0f984e5fb
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, 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
|
||||
@ -26,9 +26,10 @@
|
||||
#include "oops/compiledICHolder.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
|
||||
#ifdef ASSERT
|
||||
volatile int CompiledICHolder::_live_count;
|
||||
volatile int CompiledICHolder::_live_not_claimed_count;
|
||||
|
||||
#endif
|
||||
|
||||
CompiledICHolder::CompiledICHolder(Metadata* metadata, Klass* klass, bool is_method)
|
||||
: _holder_metadata(metadata), _holder_klass(klass), _is_metadata_method(is_method) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, 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
|
||||
@ -44,9 +44,11 @@
|
||||
class CompiledICHolder : public CHeapObj<mtCompiler> {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
#ifdef ASSERT
|
||||
static volatile int _live_count; // allocated
|
||||
static volatile int _live_not_claimed_count; // allocated but not yet in use so not
|
||||
// reachable by iterating over nmethods
|
||||
#endif
|
||||
|
||||
Metadata* _holder_metadata;
|
||||
Klass* _holder_klass; // to avoid name conflict with oopDesc::_klass
|
||||
@ -58,8 +60,10 @@ class CompiledICHolder : public CHeapObj<mtCompiler> {
|
||||
CompiledICHolder(Metadata* metadata, Klass* klass, bool is_method = true);
|
||||
~CompiledICHolder() NOT_DEBUG_RETURN;
|
||||
|
||||
#ifdef ASSERT
|
||||
static int live_count() { return _live_count; }
|
||||
static int live_not_claimed_count() { return _live_not_claimed_count; }
|
||||
#endif
|
||||
|
||||
// accessors
|
||||
Klass* holder_klass() const { return _holder_klass; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user