RFR: 8276662: Scalability bottleneck in SymbolTable::lookup_common()
Aleksey Shipilev
shade at openjdk.java.net
Tue Nov 16 19:18:39 UTC 2021
On Tue, 16 Nov 2021 19:02:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> ```
> diff --git a/src/hotspot/share/classfile/symbolTable.cpp b/src/hotspot/share/classfile/symbolTable.cpp
> index fa966fc7b22..edf48a2c2c1 100644
> --- a/src/hotspot/share/classfile/symbolTable.cpp
> +++ b/src/hotspot/share/classfile/symbolTable.cpp
> @@ -93,3 +93,3 @@ static volatile bool _has_items_to_clean = false;
> static volatile bool _alt_hash = false;
> -static volatile bool _lookup_shared_first = false;
> +static THREAD_LOCAL bool _lookup_shared_first = false;
> ```
Woot, I think it works and even the simple "Hello World" startup seems to respond:
$ perf stat -r 1000 build/server-baseline/bin/java -Xms128m -Xmx128m Hello > /dev/null
Performance counter stats for 'build/server-baseline/bin/java -Xms128m -Xmx128m Hello' (1000 runs):
29.62 msec task-clock # 1.165 CPUs utilized ( +- 0.11% )
93 context-switches # 0.003 M/sec ( +- 0.14% )
0 cpu-migrations # 0.010 K/sec ( +- 6.36% )
2,608 page-faults # 0.088 M/sec ( +- 0.01% )
83,596,348 cycles # 2.822 GHz ( +- 0.22% ) (46.41%)
10,204,346 stalled-cycles-frontend # 12.21% frontend cycles idle ( +- 0.40% ) (43.73%)
28,164,763 stalled-cycles-backend # 33.69% backend cycles idle ( +- 0.36% ) (45.36%)
63,232,465 instructions # 0.76 insn per cycle
# 0.45 stalled cycles per insn ( +- 0.10% ) (53.59%)
12,144,831 branches # 409.979 M/sec ( +- 0.11% ) (56.27%)
448,789 branch-misses # 3.70% of all branches ( +- 0.25% ) (54.64%)
0.0254298 +- 0.0000362 seconds time elapsed ( +- 0.14% )
$ perf stat -r 1000 build/linux-x86_64-server-release/images/jdk/bin/java -Xms128m -Xmx128m Hello > /dev/null
Performance counter stats for 'build/linux-x86_64-server-release/images/jdk/bin/java -Xms128m -Xmx128m Hello' (1000 runs):
29.22 msec task-clock # 1.166 CPUs utilized ( +- 0.11% )
93 context-switches # 0.003 M/sec ( +- 0.14% )
0 cpu-migrations # 0.009 K/sec ( +- 6.53% )
2,605 page-faults # 0.089 M/sec ( +- 0.01% )
81,731,944 cycles # 2.797 GHz ( +- 0.24% ) (46.56%)
10,163,520 stalled-cycles-frontend # 12.44% frontend cycles idle ( +- 0.40% ) (43.32%)
26,563,080 stalled-cycles-backend # 32.50% backend cycles idle ( +- 0.36% ) (44.87%)
63,660,354 instructions # 0.78 insn per cycle
# 0.42 stalled cycles per insn ( +- 0.09% ) (53.44%)
12,049,198 branches # 412.400 M/sec ( +- 0.12% ) (56.68%)
447,857 branch-misses # 3.72% of all branches ( +- 0.22% ) (55.13%)
0.0250630 +- 0.0000353 seconds time elapsed ( +- 0.14% )
-------------
PR: https://git.openjdk.java.net/jdk/pull/6400
More information about the hotspot-runtime-dev
mailing list