Detecting Hardware Threads
Aleksey Shipilev
shade at redhat.com
Thu Jun 3 13:54:23 UTC 2021
On 6/3/21 3:48 PM, Thomas, Samuel wrote:
> I am working on a project that requires reducing the number of usable
> hardware threads for a benchmark that is run in the Hotspot JVM. Where in
> the configuration of the JVM is this determination made and where in the
> source should I be looking in order to make such a change?
Looking for -XX:ActiveProcessorCount=# option?
The detection code would likely be OS-dependent, and grepping ActiveProcessorCount would get you
near detection code. For example, Linux:
https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/os_linux.cpp#L4700-L4732
--
Thanks,
-Aleksey
More information about the discuss
mailing list