diff options
| author | hachem <im@hachem.wtf> | 2026-09-01 16:58:48 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-01 16:58:48 +0200 |
| commit | e7e423c25754b0161c0d0d0273b03a57de6b8922 (patch) | |
| tree | eeccda3d6d20f397e5097566af4aa2dfeb40d8c2 /src/debugger/types.h | |
| parent | 37098d4db1195d3f18f396d839b4eda6942b1f8c (diff) | |
feat: attempt to add a profiler...didn't work
Diffstat (limited to 'src/debugger/types.h')
| -rw-r--r-- | src/debugger/types.h | 19 |
1 files changed, 19 insertions, 0 deletions
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<TraceCall> calls; + }; } |
