tools/testing/selftests/powerpc/pmu/ebb/trace.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/powerpc/pmu/ebb/trace.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/powerpc/pmu/ebb/trace.h- Extension
.h- Size
- 968 bytes
- Lines
- 42
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
utils.h
Detected Declarations
struct trace_entrystruct trace_buffer
Annotated Snippet
#ifndef _SELFTESTS_POWERPC_PMU_EBB_TRACE_H
#define _SELFTESTS_POWERPC_PMU_EBB_TRACE_H
#include "utils.h"
#define TRACE_TYPE_REG 1
#define TRACE_TYPE_COUNTER 2
#define TRACE_TYPE_STRING 3
#define TRACE_TYPE_INDENT 4
#define TRACE_TYPE_OUTDENT 5
struct trace_entry
{
u8 type;
u8 length;
u8 data[];
};
struct trace_buffer
{
u64 size;
bool overflow;
void *tail;
u8 data[];
};
struct trace_buffer *trace_buffer_allocate(u64 size);
int trace_log_reg(struct trace_buffer *tb, u64 reg, u64 value);
int trace_log_counter(struct trace_buffer *tb, u64 value);
int trace_log_string(struct trace_buffer *tb, char *str);
int trace_log_indent(struct trace_buffer *tb);
int trace_log_outdent(struct trace_buffer *tb);
void trace_buffer_print(struct trace_buffer *tb);
void trace_print_location(struct trace_buffer *tb);
#endif /* _SELFTESTS_POWERPC_PMU_EBB_TRACE_H */
Annotation
- Immediate include surface: `utils.h`.
- Detected declarations: `struct trace_entry`, `struct trace_buffer`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.