Skip to content

What does the API "getSystemConsumedEnergy" get? #891

Description

@baihe-liu

I'm trying to use pcm API to get energy consumption, my platform is Tiger Lake.
Could you please tell me what does system consumed energy means in the function "getSystemConsumedEnergy"?

template <class CounterStateType>
uint64 getSystemConsumedEnergy(const CounterStateType& before, const CounterStateType& after)
{
    return after.systemEnergyStatus - before.systemEnergyStatus;
}

I found SystemCounterState.systemEnergyStatus will only be updated by reading from MSR in function PCM::getALLCounterStates
And I got different result using SystemCounterState from 'getSystemCounterState' and 'getALLCounterStates'

================== Energy Consumption by getSystemCounterState  ==================  
[Energy_Monitor] getConsumedJoules: 14.5959 Joules
[Energy_Monitor] getConsumedJoules(0): 10.5076 Joules
[Energy_Monitor] getConsumedJoules(1): 0.000549316 Joules
[Energy_Monitor] getDRAMConsumedJoules: 0 Joules
[Energy_Monitor] getSystemConsumedJoules: 0 Joules
================== Energy Consumption by getALLCounterStates  ==================
[Energy_Monitor] getConsumedJoules: 14.5959 Joules
[Energy_Monitor] getConsumedJoules(0): 0 Joules
[Energy_Monitor] getConsumedJoules(1): 0 Joules
[Energy_Monitor] getDRAMConsumedJoules: 0 Joules
[Energy_Monitor] getSystemConsumedJoules: 7.3775 Joules

The system consumed joules is less that package consumed joules, what does the system consist of?
Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions