Skip to content
Permalink
Browse files
8283456: Make CompiledICHolder::live_count/live_not_claimed_count deb…
…ug only

Reviewed-by: dholmes
  • Loading branch information
zhengyu123 committed Mar 22, 2022
1 parent 85628a8 commit c0f984e5fbba7b44fa7b0a4309896ef9ccb4e666
Showing 2 changed files with 8 additions and 3 deletions.
@@ -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; }

1 comment on commit c0f984e

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on c0f984e Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.