RFR: 8266773: Release VM is broken with GCC 9 after 8214237
Jie Fu
jiefu at openjdk.java.net
Tue May 11 07:25:55 UTC 2021
On Mon, 10 May 2021 23:48:08 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>> FYI: this patch appears to solve the build issue for me:
>>
>> diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
>> index 2e52bd9dcc6..846511ae521 100644
>> --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
>> +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
>> @@ -319,7 +319,9 @@ void G1GCPhaseTimes::details(T* phase, const char* indent_str) const {
>> LogTarget(Trace, gc, phases, task) lt;
>> if (lt.is_enabled()) {
>> LogStream ls(lt);
>> - ls.print("%s", indent_str);
>> + if (indent_str) {
>> + ls.print("%s", indent_str);
>> + }
>> phase->print_details_on(&ls);
>> }
>> }
>> @@ -332,7 +334,7 @@ void G1GCPhaseTimes::log_phase(WorkerDataArray<double>* phase, uint indent_level
>> for (uint i = 0; i < phase->MaxThreadWorkItems; i++) {
>> WorkerDataArray<size_t>* work_items = phase->thread_work_items(i);
>> if (work_items != NULL) {
>> - out->print("%s", indent(indent_level + 1));
>> + out->sp(indent_level * 2);
>> work_items->print_summary_on(out, true);
>> details(work_items, indent(indent_level + 1));
>> }
>>
>>
>> Not sure if this is the correct solution.
>
>> FYI: this patch appears to solve the build issue for me:
>>
>> ```
>> diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
>> index 2e52bd9dcc6..846511ae521 100644
>> --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
>> +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
>> @@ -319,7 +319,9 @@ void G1GCPhaseTimes::details(T* phase, const char* indent_str) const {
>> LogTarget(Trace, gc, phases, task) lt;
>> if (lt.is_enabled()) {
>> LogStream ls(lt);
>> - ls.print("%s", indent_str);
>> + if (indent_str) {
>> + ls.print("%s", indent_str);
>> + }
>> phase->print_details_on(&ls);
>> }
>> }
>> @@ -332,7 +334,7 @@ void G1GCPhaseTimes::log_phase(WorkerDataArray<double>* phase, uint indent_level
>> for (uint i = 0; i < phase->MaxThreadWorkItems; i++) {
>> WorkerDataArray<size_t>* work_items = phase->thread_work_items(i);
>> if (work_items != NULL) {
>> - out->print("%s", indent(indent_level + 1));
>> + out->sp(indent_level * 2);
>> work_items->print_summary_on(out, true);
>> details(work_items, indent(indent_level + 1));
>> }
>> ```
>>
>> Not sure if this is the correct solution.
>
> Thanks @mgkwill for your info.
>
> It would be better to remove all of the old usages of indent(), which is suggested by @lkorinth .
> Thanks.
> hi @DamonFool ,
>
> Thanks for tackling this! Feel free to go forward with your patch, I'll withdraw mine.
>
> You patch looks fine. Nit: having a constant for chars-per-indentation would be nice instead of the literal 2 and " ". But I don't have strong emotions.
>
> Cheers, Thomas
Thanks @tstuefe .
What do you mean by `having a constant for chars-per-indentation would be nice instead of the literal 2 and " "`?
Could you please give me an example?
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3941
More information about the hotspot-gc-dev
mailing list