8336163: Remove declarations of some debug-only methods in release build

Reviewed-by: dholmes, eliu, kvn
This commit is contained in:
Qizheng Xing 2024-08-14 06:28:34 +00:00 committed by Eric Liu
parent 720b44648b
commit 3dd07b91bb
5 changed files with 19 additions and 5 deletions

View File

@ -371,7 +371,9 @@ private:
KlassSubGraphInfo* subgraph_info,
oop orig_obj);
#ifndef PRODUCT
static ResourceBitMap calculate_oopmap(MemRegion region); // marks all the oop pointers
#endif
static void add_to_dumped_interned_strings(oop string);
// Scratch objects for archiving Klass::java_mirror()
@ -426,7 +428,9 @@ private:
static void init_roots(oop roots_oop) NOT_CDS_JAVA_HEAP_RETURN;
static void serialize_tables(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
#ifndef PRODUCT
static bool is_a_test_class_in_unnamed_module(Klass* ik) NOT_CDS_JAVA_HEAP_RETURN_(false);
#endif
};
#if INCLUDE_CDS_JAVA_HEAP

View File

@ -179,8 +179,10 @@ class CompilationPolicy : AllStatic {
// Set carry flags in the counters (in Method* and MDO).
inline static void handle_counter_overflow(const methodHandle& method);
#ifdef ASSERT
// Verify that a level is consistent with the compilation mode
static bool verify_level(CompLevel level);
#endif
// Clamp the request level according to various constraints.
inline static CompLevel limit_level(CompLevel level);
// Common transition function. Given a predicate determines if a method should transition to another level.

View File

@ -834,7 +834,9 @@ private:
juint _class_id;
juint _flags;
#ifdef ASSERT
static juint max_flags();
#endif
protected:
// These methods should be called from constructors only.

View File

@ -387,7 +387,9 @@ class frame {
static int interpreter_frame_monitor_size();
static int interpreter_frame_monitor_size_in_bytes();
#ifdef ASSERT
void interpreter_frame_verify_monitor(BasicObjectLock* value) const;
#endif
// Return/result value from this interpreter frame
// If the method return type is T_OBJECT or T_ARRAY populates oop_result
@ -438,8 +440,10 @@ class frame {
void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
static void print_C_frame(outputStream* st, char* buf, int buflen, address pc);
#ifndef PRODUCT
// Add annotated descriptions of memory locations belonging to this frame to values
void describe(FrameValues& values, int frame_no, const RegisterMap* reg_map=nullptr);
#endif
// Conversion from a VMReg to physical stack location
template <typename RegisterMapT>
@ -492,9 +496,11 @@ class frame {
// Verification
void verify(const RegisterMap* map) const;
#ifdef ASSERT
static bool verify_return_pc(address x);
// Usage:
// assert(frame::verify_return_pc(return_address), "must be a return pc");
#endif
#include CPU_HEADER(frame)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -153,19 +153,19 @@ class RegisterMap : public StackObj {
const RegisterMap* as_RegisterMap() const { return this; }
RegisterMap* as_RegisterMap() { return this; }
#ifndef PRODUCT
void print_on(outputStream* st) const;
void print() const;
void set_async(bool value) { NOT_PRODUCT(_async = value;) }
void set_skip_missing(bool value) { NOT_PRODUCT(_skip_missing = value;) }
#ifndef PRODUCT
bool is_async() const { return _async; }
bool should_skip_missing() const { return _skip_missing; }
VMReg find_register_spilled_here(void* p, intptr_t* sp);
#endif
void set_async(bool value) { NOT_PRODUCT(_async = value;) }
void set_skip_missing(bool value) { NOT_PRODUCT(_skip_missing = value;) }
// the following contains the definition of pd_xxx methods
#include CPU_HEADER(registerMap)