The "clock" stat is inaccessible in power models


The clock stat registered in the src/sim/ file/component is inaccessible from a power model, for reasons which I cannot seem to discern.

Steps to reproduce

1. Have an ARM big.LITTLE full system with power, e.g. the one given in configs/example/arm/
2. Optionally, add custom clock- and voltage-domains to the clusters.
3. Use the "clock" stat in either the dynamic (dyn) or static (st) power equation.
4. Try to run the simulator. It should crash with the following error:

What is further strange about this is that, what I presume are deeper nested/more complex stats, like cpus.dcache.overall_accesses::total or iew.iewExecutedInsts seem to work fine.

Attempts at fixing

(full disclosure: I am fairly good at C, but have no knowledge of C++, nor am I familiar with the gem5 codebase)

I tried different variations on clk_domain.clock, _parent.clk_domain.clock, system.bigCluster.clk_domain.clock, etc., but none of these seem to fix the problem.

When looking at the file, I noticed it was including base/statistics.hh whereas was not. However, including the file and rebuilding did not fix my problem.

I did notice that the word "clock" was highlighted as a keyword in my editor (as opposed to "voltage" when opening This could just be the editor I'm using, but I thought it might be worth mentioning.


  • gem5: ARM build of gem5.opt, version 2.0 (with patches from applied)

  • Platform: Linux on x86_64


Thomas Hansen
September 18, 2020, 5:59 PM

Hello again, I hope you are all doing well. Apologies for the long silence, it has been a weird+busy summer.

It seems there is still no mention of power modelling in the Learning gem5 stuff and I would still be happy to write up the things I discovered+documented, in order to contribute them to the repo. Is anyone else working on this? And should I open a new issue for discussing these additions to the documentation?

All the best,

Jason Lowe-Power
September 19, 2020, 12:31 AM

Thanks, Thomas! No one is working on this as far as I know, and it would be a great contiribution! Opening a new issue for the documentation sounds like a good idea to me.

Thomas Hansen
September 22, 2020, 5:02 PM

Great! I will open a new issue and assign myself to it then.

Thomas Hansen
September 22, 2020, 5:16 PM

The issue/task has been created at: . It seems I cannot assign myself to the task, I assume this is to do with sensible user privileges for external users, so it is currently showing “Unassigned”. Feel free to “formally” assign me to it, depending on how important that is.

Jason Lowe-Power
September 23, 2020, 12:19 AM

Thanks! I just assigned you. I thought the permission was "you can assign yourself but not others". However, the jira permission system is a huge mess, so


Nikos Nikoleris


Thomas Hansen



Affects versions


Fix versions


Epic Link