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#include <wasmtime/module.h>
14#include <wasmtime/store.h>
15
16#ifdef WASMTIME_FEATURE_PROFILING
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
33typedef struct wasmtime_guestprofiler wasmtime_guestprofiler_t;
34
40WASM_API_EXTERN void wasmtime_guestprofiler_delete(
41 /* own */ wasmtime_guestprofiler_t *guestprofiler);
42
53 *mod;
55
74 const wasm_name_t *module_name, uint64_t interval_nanos,
75 const wasmtime_guestprofiler_modules_t *modules, size_t modules_len);
76
92WASM_API_EXTERN void
94 const wasmtime_store_t *store,
95 uint64_t delta_nanos);
96
115WASM_API_EXTERN /* own */ wasmtime_error_t *
117 /* own */ wasm_byte_vec_t *out);
118
119#ifdef __cplusplus
120} // extern "C"
121#endif
122
123#endif // WASMTIME_FEATURE_PROFILING
124
125#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:33
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:50
const wasm_name_t * name
Name recorded in the profile.
Definition: profiling.h:51
const wasmtime_module_t * mod
Module that is being allowed to appear in captured stack trace.
Definition: profiling.h:53
A compiled Wasmtime module.
Storage of WebAssembly objects.