Detecting Hardware Threads

Thomas, Samuel samuel_thomas at brown.edu
Thu Jun 3 14:09:18 UTC 2021


Great, this is what I was looking for. Thank you!

On Thu, Jun 3, 2021 at 9:54 AM Aleksey Shipilev <shade at redhat.com> wrote:

> 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