7#ifndef WASMTIME_PROFILING_H
8#define WASMTIME_PROFILING_H
16#ifdef WASMTIME_FEATURE_PROFILING
96typedef struct wasmtime_guestprofiler_module_set
165 const wasm_name_t *module_name, uint64_t interval_nanos,
186 uint64_t delta_nanos);
Build-time defines for how the C API was built.
Definition and accessors of wasmtime_error_t.
WASM_API_EXTERN wasmtime_guestprofiler_module_set_t * wasmtime_guestprofiler_module_set_clone(const wasmtime_guestprofiler_module_set_t *set)
Creates a shallow clone of the specified module set, increasing the internal reference count.
WASM_API_EXTERN wasmtime_guestprofiler_t * wasmtime_guestprofiler_new(const wasm_engine_t *engine, const wasm_name_t *module_name, uint64_t interval_nanos, const wasmtime_guestprofiler_modules_t *modules, size_t modules_len)
Begin profiling a new guest.
struct wasmtime_guestprofiler_modules wasmtime_guestprofiler_modules_t
Alias to wasmtime_guestprofiler_modules.
WASM_API_EXTERN wasmtime_guestprofiler_t * wasmtime_guestprofiler_new_with_module_set(const wasm_name_t *module_name, uint64_t interval_nanos, const wasmtime_guestprofiler_module_set_t *modules)
Begin profiling a new guest using a prepared module set.
WASM_API_EXTERN wasmtime_error_t * wasmtime_guestprofiler_finish(wasmtime_guestprofiler_t *guestprofiler, wasm_byte_vec_t *out)
Writes out the captured profile.
WASM_API_EXTERN void wasmtime_guestprofiler_module_set_delete(wasmtime_guestprofiler_module_set_t *set)
Deletes a module set.
WASM_API_EXTERN wasmtime_error_t * wasmtime_guestprofiler_module_set_new(const wasm_engine_t *engine, const wasmtime_guestprofiler_modules_t *modules, size_t modules_len, wasmtime_guestprofiler_module_set_t **out)
Prepares a set of modules for profiling.
struct wasmtime_guestprofiler wasmtime_guestprofiler_t
Collects basic profiling data for a single WebAssembly guest.
Definition: profiling.h:33
WASM_API_EXTERN void wasmtime_guestprofiler_delete(wasmtime_guestprofiler_t *guestprofiler)
Deletes profiler without finishing it.
struct wasmtime_guestprofiler_module_set wasmtime_guestprofiler_module_set_t
A set of modules prepared once for use by any number of profilers.
Definition: profiling.h:96
WASM_API_EXTERN void wasmtime_guestprofiler_sample(wasmtime_guestprofiler_t *guestprofiler, const wasmtime_store_t *store, uint64_t delta_nanos)
Add a sample to the profile.
A list of bytes.
Definition: wasm.h:102
Compilation environment and configuration.
Errors generated by Wasmtime.
Tuple of name and module for passing into wasmtime_guestprofiler_new and wasmtime_guestprofiler_modul...
Definition: profiling.h:51
const wasm_name_t * name
Name recorded in the profile.
Definition: profiling.h:52
const wasmtime_module_t * mod
Module that is being allowed to appear in captured stack trace.
Definition: profiling.h:54
A compiled Wasmtime module.
Storage of WebAssembly objects.