Wasmtime
profiling.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_PROFILING_H
8#define WASMTIME_PROFILING_H
9
10#include <wasm.h>
11#include <wasmtime/conf.h>
12#include <wasmtime/error.h>
13
14#ifdef WASMTIME_FEATURE_PROFILING
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
31typedef struct wasmtime_guestprofiler wasmtime_guestprofiler_t;
32
38WASM_API_EXTERN void wasmtime_guestprofiler_delete(
39 /* own */ wasmtime_guestprofiler_t *guestprofiler);
40
51 *mod;
53
72 const wasm_name_t *module_name, uint64_t interval_nanos,
73 const wasmtime_guestprofiler_modules_t *modules, size_t modules_len);
74
90WASM_API_EXTERN void
92 const wasmtime_store_t *store,
93 uint64_t delta_nanos);
94
113WASM_API_EXTERN /* own */ wasmtime_error_t *
115 /* own */ wasm_byte_vec_t *out);
116
117#ifdef __cplusplus
118} // extern "C"
119#endif
120
121#endif // WASMTIME_FEATURE_PROFILING
122
123#endif // WASMTIME_PROFILING_H
Build-time defines for how the C API was built.
Definition and accessors of wasmtime_error_t.
struct wasmtime_guestprofiler_modules wasmtime_guestprofiler_modules_t
Alias to wasmtime_guestprofiler_modules.
void wasmtime_guestprofiler_sample(wasmtime_guestprofiler_t *guestprofiler, const wasmtime_store_t *store, uint64_t delta_nanos)
Add a sample to the profile.
wasmtime_error_t * wasmtime_guestprofiler_finish(wasmtime_guestprofiler_t *guestprofiler, wasm_byte_vec_t *out)
Writes out the captured profile.
void wasmtime_guestprofiler_delete(wasmtime_guestprofiler_t *guestprofiler)
Deletes profiler without finishing it.
wasmtime_guestprofiler_t * wasmtime_guestprofiler_new(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 wasmtime_guestprofiler_t
Collects basic profiling data for a single WebAssembly guest.
Definition: profiling.h:31
A list of bytes.
Definition: wasm.h:102
Errors generated by Wasmtime.
Tuple of name and module for passing into wasmtime_guestprofiler_new.
Definition: profiling.h:48
const wasm_name_t * name
Name recorded in the profile.
Definition: profiling.h:49
const wasmtime_module_t * mod
Module that is being allowed to appear in captured stack trace.
Definition: profiling.h:51
A compiled Wasmtime module.
Storage of WebAssembly objects.