PatchworkOS  28a9544
A non-POSIX operating system.
Loading...
Searching...
No Matches
perf.h File Reference
#include <kernel/cpu/interrupt.h>
#include <kernel/sync/lock.h>
#include <time.h>

Go to the source code of this file.

Data Structures

struct  perf_cpu_ctx_t
 Per-CPU performance context. More...
 
struct  perf_process_ctx_t
 
struct  perf_thread_ctx_t
 Per-Thread performance context. More...
 

Typedefs

typedef struct cpu cpu_t
 
typedef struct thread thread_t
 

Functions

void perf_cpu_ctx_init (perf_cpu_ctx_t *ctx)
 Initializes a per-CPU performance context, must be called on the CPU that owns the context.
 
void perf_process_ctx_init (perf_process_ctx_t *ctx)
 Initializes a per-process performance context.
 
void perf_thread_ctx_init (perf_thread_ctx_t *ctx)
 Initializes a per-thread performance context.
 
void perf_init (void)
 Initializes the performance driver.
 
void perf_interrupt_begin (cpu_t *self)
 Called at the beginning of an interrupt to update cpu performance data.
 
void perf_interrupt_end (cpu_t *self)
 Called at the end of an interrupt to update cpu performance data.
 
void perf_syscall_begin (void)
 Called at the beginning of a syscall to update process performance data.
 
void perf_syscall_end (void)
 Called at the end of a syscall to update process performance data.
 

Typedef Documentation

◆ cpu_t

typedef struct cpu cpu_t

Definition at line 8 of file perf.h.

◆ thread_t

typedef struct thread thread_t

Definition at line 9 of file perf.h.