include/trace/events/power.h
Source file repositories/reference/linux-study-clean/include/trace/events/power.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/power.h- Extension
.h- Size
- 11479 bytes
- Lines
- 532
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cpufreq.hlinux/ktime.hlinux/pm_qos.hlinux/tracepoint.hlinux/trace_events.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM power
#if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_POWER_H
#include <linux/cpufreq.h>
#include <linux/ktime.h>
#include <linux/pm_qos.h>
#include <linux/tracepoint.h>
#include <linux/trace_events.h>
#define TPS(x) tracepoint_string(x)
DECLARE_EVENT_CLASS(cpu,
TP_PROTO(unsigned int state, unsigned int cpu_id),
TP_ARGS(state, cpu_id),
TP_STRUCT__entry(
__field( u32, state )
__field( u32, cpu_id )
),
TP_fast_assign(
__entry->state = state;
__entry->cpu_id = cpu_id;
),
TP_printk("state=%lu cpu_id=%lu", (unsigned long)__entry->state,
(unsigned long)__entry->cpu_id)
);
DEFINE_EVENT(cpu, cpu_idle,
TP_PROTO(unsigned int state, unsigned int cpu_id),
TP_ARGS(state, cpu_id)
);
TRACE_EVENT(cpu_idle_miss,
TP_PROTO(unsigned int cpu_id, unsigned int state, bool below),
TP_ARGS(cpu_id, state, below),
TP_STRUCT__entry(
__field(u32, cpu_id)
__field(u32, state)
__field(bool, below)
),
TP_fast_assign(
__entry->cpu_id = cpu_id;
__entry->state = state;
__entry->below = below;
),
TP_printk("cpu_id=%lu state=%lu type=%s", (unsigned long)__entry->cpu_id,
(unsigned long)__entry->state, (__entry->below)?"below":"above")
);
#ifdef CONFIG_ARM_PSCI_CPUIDLE
DECLARE_EVENT_CLASS(psci_domain_idle,
TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle),
TP_ARGS(cpu_id, state, s2idle),
TP_STRUCT__entry(
__field(u32, cpu_id)
__field(u32, state)
__field(bool, s2idle)
),
TP_fast_assign(
__entry->cpu_id = cpu_id;
__entry->state = state;
__entry->s2idle = s2idle;
),
TP_printk("cpu_id=%lu state=0x%lx is_s2idle=%s",
(unsigned long)__entry->cpu_id, (unsigned long)__entry->state,
(__entry->s2idle)?"yes":"no")
);
DEFINE_EVENT(psci_domain_idle, psci_domain_idle_enter,
TP_PROTO(unsigned int cpu_id, unsigned int state, bool s2idle),
Annotation
- Immediate include surface: `linux/cpufreq.h`, `linux/ktime.h`, `linux/pm_qos.h`, `linux/tracepoint.h`, `linux/trace_events.h`, `trace/define_trace.h`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.