From e7e423c25754b0161c0d0d0273b03a57de6b8922 Mon Sep 17 00:00:00 2001 From: hachem Date: Tue, 1 Sep 2026 16:58:48 +0200 Subject: feat: attempt to add a profiler...didn't work --- src/debugger/types.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/debugger/types.h') diff --git a/src/debugger/types.h b/src/debugger/types.h index e288f85..cda3dbd 100644 --- a/src/debugger/types.h +++ b/src/debugger/types.h @@ -158,4 +158,23 @@ namespace Hsdbg uint64_t address = 0; uint64_t size = 0; }; + + // one recorded activation of a traced function: when it was entered and how + // long it took. duration stays zero until the matching return is seen + struct TraceCall + { + double start = 0.0; // seconds since tracing began + double duration = 0.0; // seconds spent inside the call + }; + + // a function the user asked to time. the debugger sets an internal breakpoint + // on it that records each call without stopping the ui + struct FunctionTrace + { + uint32_t id = 0; + std::string function; + int32_t entry_backend_id = 0; + uint64_t call_count = 0; + std::vector calls; + }; } -- cgit v1.3