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/error.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
28typedef struct wasmtime_guestprofiler wasmtime_guestprofiler_t;
29
35WASM_API_EXTERN void wasmtime_guestprofiler_delete(
36 /* own */ wasmtime_guestprofiler_t *guestprofiler);
37
48 *mod;
50
69 const wasm_name_t *module_name, uint64_t interval_nanos,
70 const wasmtime_guestprofiler_modules_t *modules, size_t modules_len);
71
87WASM_API_EXTERN void
89 const wasmtime_store_t *store,
90 uint64_t delta_nanos);
91
110WASM_API_EXTERN /* own */ wasmtime_error_t *
112 /* own */ wasm_byte_vec_t *out);
113
114#ifdef __cplusplus
115} // extern "C"
116#endif
117
118#endif // WASMTIME_PROFILING_H
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:28
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:45
const wasm_name_t * name
Name recorded in the profile.
Definition: profiling.h:46
const wasmtime_module_t * mod
Module that is being allowed to appear in captured stack trace.
Definition: profiling.h:48
A compiled Wasmtime module.
Storage of WebAssembly objects.