Skip to content

multiple and conflicting implementation of cpu_load_get #97845

@nashif

Description

@nashif

Describe the bug

we have two conflicting implementations of cpu_load_get:

include/zephyr/cpu_load/cpu_load.h:int cpu_load_get(int cpu_id);
include/zephyr/debug/cpu_load.h:int cpu_load_get(bool reset);

The recent one added to support cpu_freq expands hw support and also supports multicore, the original one we had is tied into tracing and very limited in HW support.

Regression

  • This is a regression.

Steps to reproduce

git grep cpu_load_get

Relevant log output

include/zephyr/cpu_load/cpu_load.h:int cpu_load_get(int cpu_id);
include/zephyr/debug/cpu_load.h:int cpu_load_get(bool reset);

Impact

Major – Severely degrades functionality; workaround is difficult or unavailable.

Environment

No response

Additional Context

We should just have one. My preference is to remove the one under subsys/debug and see how we can enhance the new interface with some of the features that came with the debug variant, i.e. reset and counter support...

Metadata

Metadata

Assignees

Labels

area: DebuggingbugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions