Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8295146: Clean up native code with newer C/C++ language features #11081

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e668fa4
Cleanup
TheShermanTanker Oct 10, 2022
212299e
Merge remote-tracking branch 'upstream/master' into warnings
TheShermanTanker Oct 10, 2022
a0808e4
PRAGMA utility
TheShermanTanker Oct 10, 2022
eebe53b
Move PRAGMA to macros.hpp
TheShermanTanker Oct 10, 2022
daf5522
Merge remote-tracking branch 'upstream/master' into warnings
TheShermanTanker Oct 11, 2022
83ed3de
Comment PRAGMA macro and try removing the workaround from JDK-8274980
TheShermanTanker Oct 11, 2022
53062d9
Missing comparison
TheShermanTanker Oct 11, 2022
629a36a
Macro for checking empty define except strings
TheShermanTanker Oct 11, 2022
7f00d5e
Write limitations in comment instead
TheShermanTanker Oct 11, 2022
f46497b
Merge remote-tracking branch 'upstream/master' into warnings
TheShermanTanker Oct 12, 2022
06ffe35
Merge remote-tracking branch 'upstream/master' into warnings
TheShermanTanker Oct 13, 2022
d1b358e
Implement alignment with the C11 alignas feature
TheShermanTanker Oct 13, 2022
2a80644
Merge
TheShermanTanker Oct 13, 2022
ee8cc63
Make address a proper unsigned byte
TheShermanTanker Oct 13, 2022
9ea05d6
Make Pragma more robust to macro expansions
TheShermanTanker Oct 16, 2022
1a63cff
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 16, 2022
f42f257
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 17, 2022
e5f0ea4
Update compilerWarnings.hpp
TheShermanTanker Oct 17, 2022
5f1ed98
Update compilerWarnings_visCPP.hpp
TheShermanTanker Oct 17, 2022
86908cf
Update os_windows_x86.cpp
TheShermanTanker Oct 17, 2022
1c576fb
Update os_windows_aarch64.cpp
TheShermanTanker Oct 17, 2022
027a0ac
Update compilerWarnings_gcc.hpp
TheShermanTanker Oct 17, 2022
43406aa
Update compilerWarnings.hpp
TheShermanTanker Oct 17, 2022
f16109e
Update compilerWarnings_gcc.hpp
TheShermanTanker Oct 17, 2022
9252f15
Update globalDefinitions_gcc.hpp
TheShermanTanker Oct 17, 2022
c49f0b9
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 17, 2022
63a2fa5
Oops
TheShermanTanker Oct 17, 2022
9ac2a54
Update os_linux.cpp
TheShermanTanker Oct 17, 2022
d4edc9e
Update sharedRuntime_x86_64.cpp
TheShermanTanker Oct 17, 2022
e8744fb
Update MsiCA.h
TheShermanTanker Oct 17, 2022
f190f05
Update assembler_aarch64.hpp
TheShermanTanker Oct 17, 2022
bab3add
Refine pragmas
TheShermanTanker Oct 18, 2022
55001a4
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 18, 2022
7eec82b
Update macroAssembler_aarch64.cpp
TheShermanTanker Oct 18, 2022
3e1d1be
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 19, 2022
54b41b0
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 22, 2022
5d19718
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 24, 2022
73a6e38
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 26, 2022
9ab0af7
Revert
TheShermanTanker Oct 26, 2022
31970b9
Update macros.hpp
TheShermanTanker Oct 26, 2022
50e4223
Update MsiCA.h
TheShermanTanker Oct 26, 2022
b8ed539
IS_EMPTY_VALUE for macros.hpp
TheShermanTanker Oct 26, 2022
f2e3c72
Properly handle VERSION_BUILD
TheShermanTanker Oct 26, 2022
ffec8b0
macros.hpp whitespace
TheShermanTanker Oct 26, 2022
c43f955
Merge branch 'openjdk:master' into warnings
TheShermanTanker Oct 27, 2022
61bddd1
More changes to use C++11 attributes
TheShermanTanker Oct 27, 2022
48e262c
Try fixing the broken build the earlier commit caused
TheShermanTanker Oct 27, 2022
0a05374
formatBuffer.hpp hopefully won't break the build now
TheShermanTanker Oct 27, 2022
fbeae3f
Finish off remaining ATTRIBUTE_PRINTF
TheShermanTanker Oct 27, 2022
2d7c562
arguments.hpp
TheShermanTanker Oct 27, 2022
0f02174
arguments.hpp v2...
TheShermanTanker Oct 27, 2022
fb9ecb6
SCANF_ARGS and some Windows stuff
TheShermanTanker Oct 27, 2022
b55071a
Hopefully the last of arguments.hpp
TheShermanTanker Oct 27, 2022
2bf475f
Code style
TheShermanTanker Oct 29, 2022
6027331
Merge jdkMerge remote-tracking branch 'upstream/master' into warnings
TheShermanTanker Oct 29, 2022
e72b9b1
Further formatting
TheShermanTanker Oct 29, 2022
4d8b710
This will likely fail, but that's not important
TheShermanTanker Nov 9, 2022
05b31ea
Resolve Conflict
TheShermanTanker Nov 9, 2022
26b120e
Oops v2
TheShermanTanker Nov 9, 2022
85f6d91
Missed an attribute
TheShermanTanker Nov 9, 2022
7ba5a7d
Merge remote-tracking branch 'upstream/master' into conformance
TheShermanTanker Nov 12, 2022
5e4bbd0
Minor Style Changes
TheShermanTanker Nov 12, 2022
6d85c43
More Style Changes
TheShermanTanker Nov 12, 2022
bb3ef0d
ATTRIBUTE_SCANF
TheShermanTanker Nov 14, 2022
fe5371c
Revert to using simpler solution similar to the original 8274980
TheShermanTanker Nov 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/hotspot/os/linux/os_perf_linux.cpp
Expand Up @@ -230,7 +230,8 @@ static double get_cpu_load(int which_logical_cpu, CPUPerfCounters* counters, dou
/** reads /proc/<pid>/stat data, with some checks and some skips.
* Ensure that 'fmt' does _NOT_ contain the first two "%d %s"
*/
SCANF_ARGS(2, 0) static int vread_statdata(const char* procfile, _SCANFMT_ const char* fmt, va_list args) {
SCANF_ARGS(2, 0)
static int vread_statdata(const char* procfile, _SCANFMT_ const char* fmt, va_list args) {
FILE*f;
int n;
char buf[2048];
Expand Down Expand Up @@ -259,7 +260,8 @@ SCANF_ARGS(2, 0) static int vread_statdata(const char* procfile, _SCANFMT_ const
return n;
}

SCANF_ARGS(2, 3) static int read_statdata(const char* procfile, _SCANFMT_ const char* fmt, ...) {
SCANF_ARGS(2, 3)
static int read_statdata(const char* procfile, _SCANFMT_ const char* fmt, ...) {
int n;
va_list args;

Expand Down Expand Up @@ -394,7 +396,8 @@ static double get_cpu_load(int which_logical_cpu, CPUPerfCounters* counters, dou
return user_load;
}

SCANF_ARGS(1, 2) static int parse_stat(_SCANFMT_ const char* fmt, ...) {
SCANF_ARGS(1, 2)
static int parse_stat(_SCANFMT_ const char* fmt, ...) {
FILE *f;
va_list args;

Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/utilities/debug.hpp
Expand Up @@ -168,7 +168,8 @@ void report_vm_error(const char* file, int line, const char* error_msg,
const char* detail_fmt, ...);
void report_vm_status_error(const char* file, int line, const char* error_msg,
int status, const char* detail);
ATTRIBUTE_PRINTF(4, 5) void report_fatal(VMErrorType error_type, const char* file, int line, const char* detail_fmt, ...);
ATTRIBUTE_PRINTF(4, 5)
void report_fatal(VMErrorType error_type, const char* file, int line, const char* detail_fmt, ...);
ATTRIBUTE_PRINTF(5, 6)
void report_vm_out_of_memory(const char* file, int line, size_t size, VMErrorType vm_err_type,
const char* detail_fmt, ...);
Expand Down