RFR: 8326524: Rename agent_common.h
Kim Barrett
kbarrett at openjdk.org
Fri Feb 23 04:27:53 UTC 2024
On Fri, 23 Feb 2024 02:07:02 GMT, Dean Long <dlong at openjdk.org> wrote:
> If we wanted to minimize changes, we could have agent_common.h include agent_common.hpp. Then we don't have to change all the .cpp files, which have other problems, like the includes not being sorted.
The purpose of this exercise is to eliminate uses of NULL in C++ code in
test/hotspot. Coleen already dealt with most of them. But she missed some
because they were in files with a .h extension, so look like C files. However,
(nearly?) all of them contain C++ code and would not compile with a C
compiler. But there are a small number of actual C .h files. The renaming
exercise is intended to leave us with a clearer separation of languages, so we
can more easily search for misplaced NULLs.
You are correct that renaming the offending .h files to .hpp and adding a
corresponding forwarding .h file would have reduced the include churn. I feel
like that just adds to what is already a somewhat confusing mess.
And yes, there are lots of other style issues with many/most of these tests.
They also use `extern "C"` blocks in "unusual" ways.
I think test/hotspot/jtreg/vmTestbase/README.md is relevant to this discussion.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17970#issuecomment-1960715448
More information about the hotspot-compiler-dev
mailing list