ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
reader_vmem.c File Reference

Drive the real virtual-memory cache with a deterministic reader trace. More...

#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "ra8_err.h"
#include "ra8_log.h"
#include "ra8_vmem.h"
#include "ra8_vsource.h"
#include "reader_vmem_internal.h"
Include dependency graph for reader_vmem.c:

Go to the source code of this file.

Data Structures

struct  rv_workspace_storage_t
 Explicit aligned storage owned only by this single-process CLI. More...
struct  rv_chapter_t
 Per-chapter frame extent. More...
struct  rv_book_t
 Statelessly generated book extent. More...
struct  rv_driver_t
 Workload state shared by all navigation phases. More...

Enumerations

enum  rv_dimension_t : uint32_t {
  k_rv_header_frames = 4U ,
  k_rv_chapters = 24U ,
  k_rv_chap_min_fr = 8U ,
  k_rv_chap_span_fr = 160U ,
  k_rv_backglance_pct = 12U ,
  k_rv_toc_rounds = 600U ,
  k_rv_toc_read_fr = 6U ,
  k_rv_sr_rounds = 40U ,
  k_rv_sr_hot_pass = 3U ,
  k_rv_sr_hot_fr = 200U ,
  k_rv_sr_scan_fr = 1200U ,
  k_rv_pct_base = 100U ,
  k_rv_def_budget = 256U ,
  k_rv_max_objs = 2U
}
 Book and workload model dimensions. More...
enum  rv_constant_t : uint32_t {
  k_rv_xs_shift_a = 13U ,
  k_rv_xs_shift_b = 7U ,
  k_rv_xs_shift_c = 17U ,
  k_rv_fill_mul = 2654435761U ,
  k_rv_fill_shift = 24U ,
  k_rv_decimal_base = 10U ,
  k_rv_rate_scale = 10000U ,
  k_rv_rate_digits = 2U ,
  k_rv_workspace_pads = 3U
}
 Deterministic generation and decimal constants. More...
enum  rv_seed_t : uint64_t { k_rv_rng_seed = 0x9E3779B97F4A7C15ULL }
 Fixed deterministic RNG seed. More...
enum  rv_storage_size_t : uint64_t { k_rv_workspace_storage_bytes }
 Compile-time bytes reserved by the standalone composition root. More...

Functions

void ra8_log_emit_error (const char *tag, const char *message)
 Emit an ERROR-level log line with only a tag and a message.
void ra8_log_emit_error_val (const char *tag, const char *message, uint32_t value)
 Emit an ERROR log line with a uint32_t companion value.
static uint64_t internal_rng (uint64_t *state)
 Advance the driver's fixed-seed xorshift generator.
static uint32_t internal_below (uint64_t *state, uint32_t span)
 Draw one deterministic value below a non-negative span.
static ra8_err_t internal_book_read (void *context, uint64_t offset, uint8_t *buffer, uint32_t length)
 Generate exact synthetic source bytes directly at the read seam.
static void internal_layout_book (rv_driver_t *driver)
 Lay out deterministic variable-size chapters.
static void internal_touch (rv_driver_t *driver, uint32_t frame)
 Access one production cache frame and append its trace record.
static void internal_touch_header (rv_driver_t *driver)
 Re-reference the hot header and TOC region.
static void internal_phase_linear (rv_driver_t *driver)
 Run linear page-turns with hot furniture and back-glances.
static void internal_phase_toc (rv_driver_t *driver)
 Run TOC-driven chapter jumps.
static void internal_phase_scan (rv_driver_t *driver)
 Run hot-set rereads interleaved with one-shot scan floods.
static bool internal_parse_budget (const char *text, uint32_t *budget)
 Parse one strict non-zero decimal frame budget.
static bool internal_vmem_setup (ra8_vmem_t *vm, const rv_workspace_t *workspace, uint32_t budget, ra8_vsource_t *sources)
 Initialise production vmem over already bound workspace views.
static void internal_report_rate (uint32_t hits, uint64_t accesses)
 Print an integer percentage rounded to two fractional digits.
static void internal_report (const rv_driver_t *driver, const rv_book_t *book, uint32_t budget, const char *trace_path, uint32_t hits, uint32_t misses, uint32_t evictions)
 Report the firmware cache counters in the legacy CLI format.
static void internal_report_workspace (uint32_t budget, const rv_workspace_need_t *need)
 Report an exact compiled-workspace capacity failure.
static bool internal_prepare (uint32_t budget, const rv_book_t *book, rv_workspace_t *workspace, ra8_vsource_t *sources, ra8_vsource_obj_t objects[k_rv_max_objs], uint32_t *object_id, rv_workspace_need_t *need)
 Bind the workspace and register the generated book source.
static bool internal_execute (const char *trace_path, uint32_t budget)
 Execute one complete cache run and atomic trace transaction.
static void internal_usage (void)
 Print CLI usage and the explicit compiled cache ceiling.
int main (int argc, char **argv)

Variables

static rv_workspace_storage_t s_reader_workspace
 Composition-root BSS cache memory, never used by reusable libraries.

Detailed Description

Drive the real virtual-memory cache with a deterministic reader trace.

This host decision-record tool registers a synthetic book through the real ra8_vsource callback seam, drives the production ra8_vmem SLRU cache, and emits one cache_bench-compatible <object> <frame> reference per access. Synthetic source bytes are generated at the requested offset, so the source exercises the complete miss/load path without allocating an 8 MiB replica. Cache RAM is carved from the explicit composition-root workspace below.

Since
0.1.0

Definition in file reader_vmem.c.

Enumeration Type Documentation

◆ rv_constant_t

enum rv_constant_t : uint32_t

Deterministic generation and decimal constants.

Enumerator
k_rv_xs_shift_a 

First xorshift distance.

k_rv_xs_shift_b 

Second xorshift distance.

k_rv_xs_shift_c 

Third xorshift distance.

k_rv_fill_mul 

Synthetic-byte multiplier.

k_rv_fill_shift 

Synthetic-byte shift.

k_rv_decimal_base 

Decimal radix.

k_rv_rate_scale 

Hundredths-percent scale.

k_rv_rate_digits 

Printed fractional digits.

k_rv_workspace_pads 

Maximum region padding count.

Definition at line 47 of file reader_vmem.c.

◆ rv_dimension_t

enum rv_dimension_t : uint32_t

Book and workload model dimensions.

Enumerator
k_rv_header_frames 

Persistent header frames.

k_rv_chapters 

Synthetic chapter count.

k_rv_chap_min_fr 

Minimum frames per chapter.

k_rv_chap_span_fr 

Random chapter-size span.

k_rv_backglance_pct 

Prior-page glance percent.

k_rv_toc_rounds 

TOC jump rounds.

k_rv_toc_read_fr 

Frames read after a TOC jump.

k_rv_sr_rounds 

Scan-resistance rounds.

k_rv_sr_hot_pass 

Hot-set passes per round.

k_rv_sr_hot_fr 

Hot-set frame count.

k_rv_sr_scan_fr 

Scan frames per round.

k_rv_pct_base 

Percentage denominator.

k_rv_def_budget 

Default cache-frame budget.

k_rv_max_objs 

Source registry capacity.

Definition at line 29 of file reader_vmem.c.

◆ rv_seed_t

enum rv_seed_t : uint64_t

Fixed deterministic RNG seed.

Enumerator
k_rv_rng_seed 

Reproducible xorshift seed.

Definition at line 60 of file reader_vmem.c.

◆ rv_storage_size_t

enum rv_storage_size_t : uint64_t

Compile-time bytes reserved by the standalone composition root.

Enumerator
k_rv_workspace_storage_bytes 

BSS bytes.

Definition at line 65 of file reader_vmem.c.

Function Documentation

◆ internal_below()

uint32_t internal_below ( uint64_t * state,
uint32_t span )
static

Draw one deterministic value below a non-negative span.

Advances the generator for non-zero spans and maps by unsigned modulo.

Parameters
[in,out]stateDeterministic generator state.
[in]spanExclusive upper bound; zero selects deterministic zero.
Returns
Value in [0, span), or zero when span is zero.
Return values
0The zero-span result or a valid sampled zero.
sampledA value strictly below non-zero span.
Precondition
state is non-null and writable.
span may be any uint32_t value.
Postcondition
Non-zero span advances state exactly once.
Zero span leaves state unchanged.
Note
Modulo bias is intentional for deterministic workload generation.
Since
0.1.0

Definition at line 170 of file reader_vmem.c.

References internal_rng(), and RA8_INTERNAL.

Referenced by internal_layout_book(), internal_phase_linear(), and internal_phase_toc().

◆ internal_book_read()

ra8_err_t internal_book_read ( void * context,
uint64_t offset,
uint8_t * buffer,
uint32_t length )
static

Generate exact synthetic source bytes directly at the read seam.

Computes each byte from its absolute offset, avoiding a synthetic-book allocation.

Parameters
[in]contextBound rv_book_t extent.
[in]offsetFirst requested byte offset.
[out]bufferDestination spanning length bytes.
[in]lengthExact requested byte count.
Returns
Canonical virtual-source status.
Return values
k_ra8_okThe complete range was generated.
k_ra8_err_null_ptrContext or destination was null.
k_ra8_err_out_of_rangeRequest exceeds the synthetic book.
Precondition
context and buffer are null or valid for their declared extents.
The book byte extent was derived from complete frame geometry.
Postcondition
Success initializes exactly length destination bytes.
Failure does not read or write outside caller storage.
Note
Pure for a fixed context and thread-safe for independent buffers.
Since
0.1.0

Definition at line 194 of file reader_vmem.c.

References rv_book_t::bytes, k_ra8_err_null_ptr, k_ra8_err_out_of_range, k_ra8_ok, k_rv_fill_mul, and k_rv_fill_shift.

Referenced by internal_prepare().

◆ internal_execute()

bool internal_execute ( const char * trace_path,
uint32_t budget )
static

Execute one complete cache run and atomic trace transaction.

Composes workspace/source/cache state, drives every workload phase, validates production statistics, and publishes only a complete synced trace. The driver, the cache and the trace are all owned by this one frame, so the cache and trace pointers the driver carries can never outlive their objects.

Parameters
[in]trace_pathFinal trace destination.
[in]budgetRequested frame budget.
Returns
Whether a complete trace was atomically published.
Return values
trueRun, statistics, sync, and publication succeeded.
falseSetup, cache, trace, or publication failed.
Precondition
trace_path is non-null and NUL-terminated.
budget is non-zero and subject to the compiled maximum check.
Postcondition
Success publishes one complete deterministic trace and prints statistics.
Failure removes the owned private trace; pre-rename final is preserved.
Note
Not thread-safe through production cache global/static limits.
Since
0.1.0

Definition at line 607 of file reader_vmem.c.

References rv_driver_t::failed, internal_layout_book(), internal_phase_linear(), internal_phase_scan(), internal_phase_toc(), internal_prepare(), internal_report(), internal_vmem_setup(), k_ra8_ok, k_rv_frame_bytes, k_rv_max_objs, k_rv_rng_seed, rv_driver_t::object_id, priv_rv_diag(), priv_rv_trace_abort(), priv_rv_trace_begin(), priv_rv_trace_commit(), RA8_INTERNAL, ra8_vmem_stats(), rv_driver_t::total_frames, rv_driver_t::trace, and rv_driver_t::vm.

Referenced by main().

◆ internal_layout_book()

void internal_layout_book ( rv_driver_t * driver)
static

Lay out deterministic variable-size chapters.

Consumes one bounded random draw per chapter after the fixed header extent.

Parameters
[in,out]driverWorkload driver owning RNG and chapter table.
Precondition
driver is non-null and its RNG was initialized.
Chapter constants cannot overflow the uint32_t frame cursor.
Postcondition
Every chapter extent is initialized, ordered, and non-overlapping.
total_frames is one past the final chapter frame.
Note
Not thread-safe through driver.
Since
0.1.0

Definition at line 221 of file reader_vmem.c.

References rv_driver_t::chapters, internal_below(), k_rv_chap_min_fr, k_rv_chap_span_fr, k_rv_chapters, k_rv_header_frames, RA8_INTERNAL, rv_driver_t::rng, and rv_driver_t::total_frames.

Referenced by internal_execute().

◆ internal_parse_budget()

bool internal_parse_budget ( const char * text,
uint32_t * budget )
static

Parse one strict non-zero decimal frame budget.

Accepts ASCII digits only and checks every base-ten accumulation for overflow.

Parameters
[in]textNUL-terminated budget spelling.
[out]budgetReceives the parsed non-zero frame count.
Returns
Whether the complete spelling is valid.
Return values
trueA non-zero uint32_t value was stored.
falseInput is null, empty, non-decimal, zero, or overflowing.
Precondition
text is null or NUL-terminated.
budget is non-null and writable.
Postcondition
Success initializes budget exactly once.
Failure leaves budget unchanged.
Note
Locale-independent and allocation-free.
Since
0.1.0

Definition at line 383 of file reader_vmem.c.

References k_rv_decimal_base, and RA8_INTERNAL.

Referenced by main().

◆ internal_phase_linear()

void internal_phase_linear ( rv_driver_t * driver)
static

Run linear page-turns with hot furniture and back-glances.

Visits every chapter page, refreshing header frames each turn and adding deterministic prior-page glances according to the fixed percentage.

Parameters
[in,out]driverPrepared and laid-out workload driver.
Precondition
driver owns live cache, trace, chapter, and RNG state.
Chapter extents lie within driver->total_frames.
Postcondition
Every chapter page was referenced once in reading order.
RNG and access counters reflect all deterministic glance decisions.
Note
Continues after sticky failure to preserve deterministic trace attempts.
Since
0.1.0

Definition at line 299 of file reader_vmem.c.

References rv_driver_t::chapters, rv_chapter_t::count, rv_chapter_t::first, internal_below(), internal_touch(), internal_touch_header(), k_rv_backglance_pct, k_rv_chapters, k_rv_pct_base, RA8_INTERNAL, and rv_driver_t::rng.

Referenced by internal_execute().

◆ internal_phase_scan()

void internal_phase_scan ( rv_driver_t * driver)
static

Run hot-set rereads interleaved with one-shot scan floods.

Alternates repeated hot prefixes with modular scans to exercise SLRU pollution resistance.

Parameters
[in,out]driverPrepared and laid-out workload driver.
Precondition
driver owns live cache and trace state.
Total book frames exceed the fixed header extent.
Postcondition
Every configured hot pass and scan reference was attempted.
Scan cursor advances deterministically by one scan extent per round.
Note
Not thread-safe through driver.
Since
0.1.0

Definition at line 350 of file reader_vmem.c.

References internal_touch(), k_rv_header_frames, k_rv_sr_hot_fr, k_rv_sr_hot_pass, k_rv_sr_rounds, k_rv_sr_scan_fr, RA8_INTERNAL, and rv_driver_t::total_frames.

Referenced by internal_execute().

◆ internal_phase_toc()

void internal_phase_toc ( rv_driver_t * driver)
static

Run TOC-driven chapter jumps.

Repeats header refresh, deterministic chapter selection, and a bounded prefix read.

Parameters
[in,out]driverPrepared and laid-out workload driver.
Precondition
driver owns live cache, trace, chapter, and RNG state.
Every chapter count is non-zero and within book geometry.
Postcondition
Exactly k_rv_toc_rounds chapter selections occurred.
Each selection touched no more than k_rv_toc_read_fr chapter frames.
Note
Not thread-safe through driver.
Since
0.1.0

Definition at line 327 of file reader_vmem.c.

References rv_driver_t::chapters, rv_chapter_t::count, rv_chapter_t::first, internal_below(), internal_touch(), internal_touch_header(), k_rv_chapters, k_rv_toc_read_fr, k_rv_toc_rounds, RA8_INTERNAL, and rv_driver_t::rng.

Referenced by internal_execute().

◆ internal_prepare()

bool internal_prepare ( uint32_t budget,
const rv_book_t * book,
rv_workspace_t * workspace,
ra8_vsource_t * sources,
ra8_vsource_obj_t objects[k_rv_max_objs],
uint32_t * object_id,
rv_workspace_need_t * need )
static

Bind the workspace and register the generated book source.

Derives exact region requirements, enforces the compiled ceiling, binds typed views, and registers one stateless positioned-read source.

Parameters
[in]budgetRequested cache frame count.
[in]bookSynthetic book extent.
[out]workspaceReceives typed cache storage views.
[out]sourcesReceives initialized source registry.
[out]objectsCaller-owned registry-object array.
[out]object_idReceives the registered synthetic object identifier.
[out]needReceives exact workspace geometry.
Returns
Whether all bounded composition steps succeeded.
Return values
trueWorkspace and source are ready for cache initialization.
falseRequirement, capacity, binding, or registration failed.
Precondition
All pointers are non-null and object array has k_rv_max_objs entries.
book has a non-zero bounded byte extent.
Postcondition
Success initializes every output without allocation.
Failure leaves no descriptor or dynamically owned storage.
Note
The composition-root BSS backing supports this one CLI run.
Since
0.1.0

Definition at line 559 of file reader_vmem.c.

References rv_book_t::bytes, internal_book_read(), internal_report_workspace(), k_ra8_ok, k_rv_max_objs, priv_rv_diag(), priv_rv_workspace_bind(), priv_rv_workspace_require(), RA8_INTERNAL, ra8_vsource_add_paged(), ra8_vsource_init(), READER_VMEM_MAX_BUDGET, s_reader_workspace, and rv_workspace_need_t::total_bytes.

Referenced by internal_execute().

◆ internal_report()

void internal_report ( const rv_driver_t * driver,
const rv_book_t * book,
uint32_t budget,
const char * trace_path,
uint32_t hits,
uint32_t misses,
uint32_t evictions )
static

Report the firmware cache counters in the legacy CLI format.

Emits deterministic raw-descriptor fragments for golden-output parity.

Parameters
[in]driverCompleted workload driver.
[in]bookSynthetic source extent.
[in]budgetConfigured frame budget.
[in]trace_pathPublished trace path.
[in]hitsProduction cache hit count.
[in]missesProduction cache miss count.
[in]evictionsProduction cache eviction count.
Precondition
All pointers are non-null and NUL-terminated where applicable.
Statistics were obtained from the completed cache instance.
Postcondition
Complete report fragments were attempted on standard error.
Input structures and published trace are unchanged.
Note
Best-effort diagnostic failure does not alter process status.
Since
0.1.0

Definition at line 484 of file reader_vmem.c.

References rv_driver_t::accesses, rv_book_t::bytes, internal_report_rate(), priv_rv_diag(), priv_rv_diag_u64(), RA8_INTERNAL, and rv_driver_t::total_frames.

Referenced by internal_execute().

◆ internal_report_rate()

void internal_report_rate ( uint32_t hits,
uint64_t accesses )
static

Print an integer percentage rounded to two fractional digits.

Uses scaled integer arithmetic and raw diagnostic fragments only.

Parameters
[in]hitsSuccessful cache-hit count.
[in]accessesTotal reference count.
Precondition
hits does not exceed the successful-access subset.
Scaling hits * 10000 is representable in uint64_t.
Postcondition
One decimal percentage spelling was attempted on standard error.
No cache, trace, or workload state changed.
Note
Zero accesses render as 0.00.
Since
0.1.0

Definition at line 452 of file reader_vmem.c.

References k_rv_decimal_base, k_rv_pct_base, k_rv_rate_scale, priv_rv_diag(), priv_rv_diag_u64(), and RA8_INTERNAL.

Referenced by internal_report().

◆ internal_report_workspace()

void internal_report_workspace ( uint32_t budget,
const rv_workspace_need_t * need )
static

Report an exact compiled-workspace capacity failure.

Prints requested and compiled capacities using integer-only formatting.

Parameters
[in]budgetRequested frame budget.
[in]needExact workspace requirement computed for that budget.
Precondition
need is non-null and fully initialized.
Requirement exceeds either compiled frame or byte capacity.
Postcondition
One diagnostic message was attempted on standard error.
Workspace backing and requirement remain unchanged.
Note
Best-effort output uses no stdio stream or allocation.
Since
0.1.0

Definition at line 525 of file reader_vmem.c.

References priv_rv_diag(), priv_rv_diag_u64(), RA8_INTERNAL, READER_VMEM_MAX_BUDGET, s_reader_workspace, and rv_workspace_need_t::total_bytes.

Referenced by internal_prepare().

◆ internal_rng()

uint64_t internal_rng ( uint64_t * state)
static

Advance the driver's fixed-seed xorshift generator.

Applies the fixed three-shift recurrence used by every workload phase.

Parameters
[in,out]stateNon-zero deterministic generator state.
Returns
Newly advanced generator value.
Return values
valueExact next state after one recurrence.
Precondition
state is non-null and writable.
The caller initialized state from the documented fixed seed.
Postcondition
*state equals the returned value.
Exactly one generator step occurred.
Note
Not thread-safe through a shared state word.
Since
0.1.0

Definition at line 145 of file reader_vmem.c.

References k_rv_xs_shift_a, k_rv_xs_shift_b, k_rv_xs_shift_c, and RA8_INTERNAL.

Referenced by internal_below().

◆ internal_touch()

void internal_touch ( rv_driver_t * driver,
uint32_t frame )
static

Access one production cache frame and append its trace record.

Exercises get/put through production vmem, records the same reference, and makes any cache or trace failure sticky while preserving workload length.

Parameters
[in,out]driverFully prepared workload driver.
[in]frameSynthetic book frame number to reference.
Precondition
driver owns live cache and trace contexts.
frame is below driver->total_frames.
Postcondition
Access count advances exactly once and one trace append is attempted.
Any cache/trace error leaves driver->failed set.
Note
Not thread-safe through cache, trace, or driver state.
Since
0.1.0

Definition at line 246 of file reader_vmem.c.

References rv_driver_t::accesses, rv_driver_t::failed, k_ra8_ok, k_rv_frame_bytes, rv_driver_t::object_id, priv_rv_diag(), priv_rv_diag_u64(), priv_rv_trace_reference(), RA8_INTERNAL, ra8_vmem_get(), ra8_vmem_put(), rv_driver_t::trace, and rv_driver_t::vm.

Referenced by internal_phase_linear(), internal_phase_scan(), internal_phase_toc(), and internal_touch_header().

◆ internal_touch_header()

void internal_touch_header ( rv_driver_t * driver)
static

Re-reference the hot header and TOC region.

Touches the fixed leading frame range in ascending order.

Parameters
[in,out]driverPrepared workload driver.
Precondition
driver owns live cache and trace contexts.
Synthetic book contains at least k_rv_header_frames frames.
Postcondition
Exactly k_rv_header_frames references were attempted.
Sticky failure semantics from internal_touch are preserved.
Note
Not thread-safe through driver.
Since
0.1.0

Definition at line 280 of file reader_vmem.c.

References internal_touch(), k_rv_header_frames, and RA8_INTERNAL.

Referenced by internal_phase_linear(), and internal_phase_toc().

◆ internal_usage()

void internal_usage ( void )
static

Print CLI usage and the explicit compiled cache ceiling.

Uses bounded raw diagnostic fragments and integer formatting.

Precondition
Standard error may accept or reject output.
READER_VMEM_MAX_BUDGET is representable by the decimal helper.
Postcondition
Usage and maximum-budget text were attempted.
No filesystem, cache, or workspace state changed.
Note
Best-effort diagnostic failures are intentionally ignored.
Since
0.1.0

Definition at line 662 of file reader_vmem.c.

References priv_rv_diag(), priv_rv_diag_u64(), RA8_INTERNAL, and READER_VMEM_MAX_BUDGET.

Referenced by main().

◆ internal_vmem_setup()

bool internal_vmem_setup ( ra8_vmem_t * vm,
const rv_workspace_t * workspace,
uint32_t budget,
ra8_vsource_t * sources )
static

Initialise production vmem over already bound workspace views.

Binds explicit cache regions and the virtual-source loader into one configuration.

Parameters
[out]vmCaller-owned cache object.
[in]workspaceBound non-overlapping cache regions.
[in]budgetNumber of frames represented by the regions.
[in,out]sourcesInitialized virtual-source registry.
Returns
Whether production cache initialization succeeded.
Return values
trueCache is ready for get/put operations.
falseProduction configuration validation failed.
Precondition
All pointers are non-null and workspace regions match budget.
sources remains alive for the cache lifetime.
Postcondition
Success initializes vm without acquiring storage.
Failure leaves no hidden allocation or resource ownership.
Note
Not thread-safe through vm or sources.
Since
0.1.0

Definition at line 423 of file reader_vmem.c.

References rv_workspace_t::buckets, rv_workspace_t::frame_mem, k_ra8_ok, k_rv_bucket_count, k_rv_frame_bytes, rv_workspace_t::keys, rv_workspace_t::meta, RA8_INTERNAL, ra8_vmem_init(), and ra8_vsource_loader().

Referenced by internal_execute().

◆ main()

int main ( int argc,
char ** argv )

◆ ra8_log_emit_error()

void ra8_log_emit_error ( const char * tag,
const char * message )

Emit an ERROR-level log line with only a tag and a message.

Backend entry point for the ra8_log_error() macro.

Parameters
[in]tagShort component tag; must not be NULL.
[in]messageFree-form ASCII message; must not be NULL.
Precondition
tag and message are NUL-terminated strings.
ra8_log_init() has run (otherwise dropped).
Postcondition
One log line emitted or dropped.
No caller-visible state modified.
Note
Thread-safety inherited from the backend.
Since
0.1.0

Emit an ERROR-level log line with only a tag and a message.

Definition at line 112 of file reader_vmem.c.

References internal_emit_line(), and priv_rv_diag().

◆ ra8_log_emit_error_val()

void ra8_log_emit_error_val ( const char * tag,
const char * message,
uint32_t value )

Emit an ERROR log line with a uint32_t companion value.

Adds =<decimal> to the line emitted by ra8_log_emit_error.

Parameters
[in]tagShort component tag; must not be NULL.
[in]messageFree-form ASCII message; must not be NULL.
[in]valueUnsigned numeric companion appended to the line.
Precondition
tag and message are NUL-terminated strings.
ra8_log_init() has run.
Postcondition
One log line emitted or dropped.
No caller-visible state modified.
Note
Thread-safety inherited from the backend.
Since
0.1.0

Emit an ERROR log line with a uint32_t companion value.

Weak default backend. Forwards to internal_emit_line_u with the fixed level string "ERROR".

Parameters
[in]tagNUL-terminated module tag (e.g. "ra8_log").
[in]messageNUL-terminated short event description.
[in]valueuint32 datum appended as "=NNN" to the line.
Precondition
tag and message are non-NULL, NUL-terminated.
ra8_log_init() has run (otherwise the line is silently dropped).
Postcondition
One line is emitted to the log backend (or dropped if backend down).
No internal logger state is modified.
Note
Thread-safety inherited from the active backend (ITM by default).
Since
0.1.0

Emit an ERROR log line with a uint32_t companion value.

Definition at line 121 of file reader_vmem.c.

References internal_emit_line_u(), priv_rv_diag(), and priv_rv_diag_u64().

Variable Documentation

◆ s_reader_workspace

rv_workspace_storage_t s_reader_workspace
static

Composition-root BSS cache memory, never used by reusable libraries.

The workspace planner accepts arbitrary caller backings; this one named instance is the standalone tool's explicit RAM budget.

Definition at line 87 of file reader_vmem.c.

Referenced by internal_prepare(), and internal_report_workspace().