RFR: 8266773: Release VM is broken with GCC 9 after 8214237

Jie Fu jiefu at openjdk.java.net
Mon May 10 23:51:03 UTC 2021


On Mon, 10 May 2021 22:31:54 GMT, Marcus G K Williams <mgkwill 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.

Thanks @mgkwill for your info.

It would be better to remove all of the old usages of indent(), which is suggested by @lkorinth .
Thanks.

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

PR: https://git.openjdk.java.net/jdk/pull/3941



More information about the hotspot-gc-dev mailing list