MCPcopy Create free account
hub / github.com/dispatchrun/wzprof / Before

Method Before

mem.go:280–284  ·  view source on GitHub ↗
(ctx context.Context, mod api.Module, def api.FunctionDefinition, params []uint64, si experimental.StackIterator)

Source from the content-addressed store, hash-verified

278}
279
280func (p *callocProfiler) Before(ctx context.Context, mod api.Module, def api.FunctionDefinition, params []uint64, si experimental.StackIterator) {
281 p.count = api.DecodeU32(params[0])
282 p.size = api.DecodeU32(params[1])
283 p.stack = makeStackTrace(p.stack, si)
284}
285
286func (p *callocProfiler) After(ctx context.Context, mod api.Module, def api.FunctionDefinition, results []uint64) {
287 p.memory.observeAlloc(api.DecodeU32(results[0]), p.count*p.size, p.stack)

Callers

nothing calls this directly

Calls 1

makeStackTraceFunction · 0.85

Tested by

no test coverage detected