ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
trace.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <stdint.h>
16
17#include "cache_bench.h"
18#include "cache_bench_io.h"
19
27
40
52
54typedef struct {
56 uint64_t index;
57 uint64_t rng;
58 uint64_t fingerprint;
59 uint64_t source_offset;
60 uint32_t page;
61 uint32_t hot;
62 size_t read_at;
63 size_t read_count;
67
81
103cb_trace_bind(const cb_source_t* source, const char* name, size_t name_length, cb_trace_t* out);
104
122
142
Eviction-policy comparison harness for the #147 memory-hierarchy decision record: the DIP seam every ...
struct cb_trace cb_trace_t
Definition cache_bench.h:28
Bounded byte-source and text-sink seams for cache_bench.
cb_io_status_t
Status returned by tool-local injected I/O callbacks.
A cache key: one (object, page) the reader's vm_get touches.
Definition cache_bench.h:31
Immutable injected byte source with a snapshotted length.
Caller-owned state for one independent trace pass.
Definition trace.h:54
uint32_t page
Stateful generator page.
Definition trace.h:60
uint64_t source_offset
Next source byte offset.
Definition trace.h:59
size_t read_count
Valid read-ahead bytes.
Definition trace.h:63
uint64_t fingerprint
Captured pass fingerprint.
Definition trace.h:58
char line[k_cb_trace_line_capacity]
Bounded line assembly.
Definition trace.h:65
const cb_trace_t * trace
Bound immutable descriptor.
Definition trace.h:55
uint64_t rng
Generator state.
Definition trace.h:57
size_t read_at
Read-ahead cursor.
Definition trace.h:62
uint32_t hot
Stateful hot-window base.
Definition trace.h:61
uint8_t read_buffer[k_cb_trace_read_capacity]
Bounded read-ahead.
Definition trace.h:64
uint64_t index
Accesses emitted.
Definition trace.h:56
Named resettable trace; captured bytes remain owned by the caller.
Definition trace.h:42
const char * name
Stable display name.
Definition trace.h:43
cb_trace_kind_t kind
Generator/parser selection.
Definition trace.h:46
cb_source_t source
Captured source binding, when selected.
Definition trace.h:47
uint64_t fingerprint
Bound captured-content fingerprint.
Definition trace.h:48
uint32_t footprint
Reported working-set pages.
Definition trace.h:45
char name_storage[k_cb_trace_name_capacity]
Captured-name copy.
Definition trace.h:50
uint64_t n
Valid access count.
Definition trace.h:44
cb_trace_limit_t
Number of built-in deterministic workloads.
Definition trace.h:21
@ k_cb_trace_line_capacity
Historical line-parser bound.
Definition trace.h:24
@ k_cb_trace_read_capacity
Bounded source read-ahead.
Definition trace.h:25
@ k_cb_trace_name_capacity
Captured trace display-name bound.
Definition trace.h:23
@ k_cb_synthetic_trace_count
Fixed corpus size.
Definition trace.h:22
cb_io_status_t cb_trace_cursor_next(cb_trace_cursor_t *cursor, cb_key_t *key, bool *done)
Emit the next key.
Definition trace.c:438
cb_io_status_t cb_trace_cursor_finish(const cb_trace_cursor_t *cursor)
Validate a captured pass against its bound count and fingerprint.
Definition trace.c:459
cb_io_status_t cb_trace_cursor_open(const cb_trace_t *trace, cb_trace_cursor_t *cursor)
Reset a cursor for an independent pass over a trace.
Definition trace.c:418
struct cb_trace cb_trace_t
Named resettable trace; captured bytes remain owned by the caller.
cb_trace_kind_t
Workload implementation selected by a trace descriptor.
Definition trace.h:29
@ k_cb_trace_seq
Sequential page walk.
Definition trace.h:30
@ k_cb_trace_mixed
Alternating access phases.
Definition trace.h:37
@ k_cb_trace_reread
Hot-set reread workload.
Definition trace.h:32
@ k_cb_trace_scroll
Repeated scrolling window.
Definition trace.h:34
@ k_cb_trace_huge
Oversized hot-set and scan.
Definition trace.h:36
@ k_cb_trace_captured
Caller-injected captured accesses.
Definition trace.h:38
@ k_cb_trace_scan
Hot-set plus streaming scan.
Definition trace.h:35
@ k_cb_trace_jumps
Mostly sequential with jumps.
Definition trace.h:33
@ k_cb_trace_random
Uniform pseudo-random accesses.
Definition trace.h:31
cb_io_status_t cb_trace_bind(const cb_source_t *source, const char *name, size_t name_length, cb_trace_t *out)
Validate and bind one captured decimal <object> <page> source.
Definition trace.c:473
void cb_traces_synthetic(cb_trace_t out[k_cb_synthetic_trace_count])
Populate the fixed built-in corpus without acquiring storage.
Definition trace.c:141