include/trace/events/memcg.h
Source file repositories/reference/linux-study-clean/include/trace/events/memcg.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/memcg.h- Extension
.h- Size
- 2265 bytes
- Lines
- 107
- 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/memcontrol.hlinux/tracepoint.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 memcg
#if !defined(_TRACE_MEMCG_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_MEMCG_H
#include <linux/memcontrol.h>
#include <linux/tracepoint.h>
DECLARE_EVENT_CLASS(memcg_rstat_stats,
TP_PROTO(struct mem_cgroup *memcg, int item, long val),
TP_ARGS(memcg, item, val),
TP_STRUCT__entry(
__field(u64, id)
__field(int, item)
__field(long, val)
),
TP_fast_assign(
__entry->id = cgroup_id(memcg->css.cgroup);
__entry->item = item;
__entry->val = val;
),
TP_printk("memcg_id=%llu item=%d val=%ld",
__entry->id, __entry->item, __entry->val)
);
DEFINE_EVENT(memcg_rstat_stats, mod_memcg_state,
TP_PROTO(struct mem_cgroup *memcg, int item, long val),
TP_ARGS(memcg, item, val)
);
DEFINE_EVENT(memcg_rstat_stats, mod_memcg_lruvec_state,
TP_PROTO(struct mem_cgroup *memcg, int item, long val),
TP_ARGS(memcg, item, val)
);
DECLARE_EVENT_CLASS(memcg_rstat_events,
TP_PROTO(struct mem_cgroup *memcg, int item, unsigned long val),
TP_ARGS(memcg, item, val),
TP_STRUCT__entry(
__field(u64, id)
__field(int, item)
__field(unsigned long, val)
),
TP_fast_assign(
__entry->id = cgroup_id(memcg->css.cgroup);
__entry->item = item;
__entry->val = val;
),
TP_printk("memcg_id=%llu item=%d val=%lu",
__entry->id, __entry->item, __entry->val)
);
DEFINE_EVENT(memcg_rstat_events, count_memcg_events,
TP_PROTO(struct mem_cgroup *memcg, int item, unsigned long val),
TP_ARGS(memcg, item, val)
);
TRACE_EVENT(memcg_flush_stats,
TP_PROTO(struct mem_cgroup *memcg, s64 stats_updates,
bool force, bool needs_flush),
TP_ARGS(memcg, stats_updates, force, needs_flush),
TP_STRUCT__entry(
__field(u64, id)
__field(s64, stats_updates)
__field(bool, force)
__field(bool, needs_flush)
),
TP_fast_assign(
Annotation
- Immediate include surface: `linux/memcontrol.h`, `linux/tracepoint.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.