JDK-8230663 : Add active processor count to recorded JFR data
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 14
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2019-09-05
  • Updated: 2024-06-04
  • Resolved: 2022-08-03
Related Reports
Blocks :  
Relates :  
Description
Add  os::active_processor_count. Probably as a new event under OS/Processor/ (though some of the events there should arguably be under OS/Process rather than Processor). Or, perhaps, as a new attribute under the CPU Information event, though that feels like violating that event slightly (mixing hardware and process configuration).

See also https://bugs.openjdk.java.net/browse/JDK-8146115.
Comments
The event ContainerConfiguration contains the field effectiveCpuCount ("Number of effective processors that this container has available to it") I am assuming it is equivalent to what is being requested here, so I am closing this enhancement. If not, please reopen.
03-08-2022

Ah. Closed a bit early, that one. :)
09-09-2019

It only contains a link to this issue, which I think you are familiar with :) https://bugs.openjdk.java.net/browse/JDK-8203359
09-09-2019

Container support is on the roadmap. See https://bugs.openjdk.java.net/browse/BKLG-1331
06-09-2019

There is `VirtualizationInformation` event. Haven't found more details about what it is supposed to represent but perhaps we could extend this event with container specific info?
06-09-2019

How about introducing a new container info event, which we can later add additional data points from the container environment to?
06-09-2019

Good to know. Let's keep that in mind when fixing this. "The maximum it can achieve is around 40,000 calls a second" Some of the periodic events today are more expensive than that, but they are only emitted once per chunk file. -Xlog:jfr+system+event=debug Can be used to see how fast they execute.
06-09-2019

Okay. Just FYI it can be an expensive call due to container support - see JDK-8227006.
06-09-2019

Most of these kind of events are requestables, usually emitted once per chunk. The natural expectation would be to get the current value when the event is emitted.
06-09-2019

Are you talking about the initial active processor count? It is potentially a dynamic value.
05-09-2019

Would work too!
05-09-2019

Perhaps on the the jdk.OSInformation event?
05-09-2019