|
PatchworkOS
3984a1d
A non-POSIX operating system.
|
#include <kernel/cpu/interrupt.h>#include <kernel/drivers/perf.h>#include <kernel/cpu/cpu.h>#include <kernel/fs/devfs.h>#include <kernel/fs/file.h>#include <kernel/fs/vfs.h>#include <kernel/log/log.h>#include <kernel/log/panic.h>#include <kernel/mem/pmm.h>#include <kernel/sched/clock.h>#include <kernel/sched/sched.h>#include <kernel/sched/timer.h>#include <kernel/sync/lock.h>#include <kernel/utils/utils.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <sys/io.h>#include <sys/list.h>#include <sys/math.h>Go to the source code of this file.
Functions | |
| static size_t | perf_cpu_read (file_t *file, void *buffer, size_t count, size_t *offset) |
| static size_t | perf_mem_read (file_t *file, void *buffer, size_t count, size_t *offset) |
| 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. | |
Variables | |
| static dentry_t * | perfDir = NULL |
| static dentry_t * | cpuFile = NULL |
| static dentry_t * | memFile = NULL |
| static file_ops_t | cpuOps |
| static file_ops_t | memOps |
|
static |
|
static |