Integrated: 8355617: Remove historical debug_only macro in favor of DEBUG_ONLY

Aleksey Shipilev shade at openjdk.org
Mon Apr 28 08:46:11 UTC 2025


On Fri, 25 Apr 2025 15:17:17 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I noticed in `macros.hpp`:
> 
> 
> #ifdef ASSERT
> #define DEBUG_ONLY(code) code
> #define NOT_DEBUG(code)
> #define NOT_DEBUG_RETURN /*next token must be ;*/
> // Historical.
> #define debug_only(code) code
> #else // ASSERT
> 
> 
> There are 350+ instances of `debug_only`, and 1600+ instances of `DEBUG_ONLY`. We can cleanup `debug_only` and rewrite all uses to `DEBUG_ONLY`. 
> 
> I think we can do this in one shot. This was a mechanical rename. I have looked through the `grep -R debug_only src/ | nl`, and there are no hits anymore.
> 
> Additional testing:
>  - [x] GHA

This pull request has now been integrated.

Changeset: db6fa592
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/db6fa5923cd0394dfb44c7e46c3e7ccc102a933a
Stats:     371 lines in 119 files changed: 0 ins; 3 del; 368 mod

8355617: Remove historical debug_only macro in favor of DEBUG_ONLY

Reviewed-by: stefank, kbarrett, jwaters

-------------

PR: https://git.openjdk.org/jdk/pull/24879


More information about the hotspot-dev mailing list