|
PatchworkOS
|
#include <kernel/drivers/statistics.h>#include <kernel/cpu/cpu.h>#include <kernel/cpu/smp.h>#include <kernel/fs/file.h>#include <kernel/fs/sysfs.h>#include <kernel/fs/vfs.h>#include <kernel/log/panic.h>#include <kernel/mem/pmm.h>#include <kernel/sched/sched.h>#include <kernel/sched/timer.h>#include <kernel/sync/lock.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <sys/io.h>#include <sys/math.h>Go to the source code of this file.
Functions | |
| void | statistics_cpu_ctx_init (statistics_cpu_ctx_t *ctx) |
| Initializes a per-CPU statistics context. | |
| static uint64_t | statistics_cpu_read (file_t *file, void *buffer, uint64_t count, uint64_t *offset) |
| static uint64_t | statistics_mem_read (file_t *file, void *buffer, uint64_t count, uint64_t *offset) |
| void | statistics_init (void) |
| Initializes the statistics driver. | |
| void | statistics_interrupt_begin (interrupt_frame_t *frame, cpu_t *self) |
| Called at the beginning of an interrupt. | |
| void | statistics_interrupt_end (interrupt_frame_t *frame, cpu_t *self) |
| Called at the end of an interrupt. | |
Variables | |
| static dentry_t * | statDir = NULL |
| static dentry_t * | cpuFile = NULL |
| static dentry_t * | memFile = NULL |
| static file_ops_t | cpuOps |
| static file_ops_t | memOps |
|
static |
Definition at line 34 of file statistics.c.
References buffer, BUFFER_READ, count, ERR, file, free(), cpu_t::id, LOCK_SCOPE, malloc(), MAX_PATH, NULL, sched_is_idle(), smp_cpu(), smp_cpu_amount(), sprintf(), cpu_t::stat, stat(), strcpy(), strlen(), and timer_uptime().
|
static |
Definition at line 77 of file statistics.c.
References buffer, BUFFER_READ, count, ERR, file, free(), malloc(), MAX_PATH, NULL, PAGE_SIZE, pmm_free_amount(), pmm_reserved_amount(), pmm_total_amount(), sprintf(), and strlen().
Definition at line 21 of file statistics.c.
Referenced by statistics_init().
|
static |
Definition at line 73 of file statistics.c.
Referenced by statistics_init().
Definition at line 22 of file statistics.c.
Referenced by statistics_init().
|
static |
Definition at line 96 of file statistics.c.
Referenced by statistics_init().
Definition at line 20 of file statistics.c.
Referenced by statistics_init().