diff options
| author | Stefan Boberg <[email protected]> | 2024-12-02 12:21:53 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-12-02 12:21:53 +0100 |
| commit | e6f44577f469e891ed8dab1492a4c53224e0b765 (patch) | |
| tree | 47334606ce62fb6bf1975cdc09276ced335599f4 /src/zenutil/openprocesscache.cpp | |
| parent | 5.5.15-pre0 (diff) | |
| download | zen-e6f44577f469e891ed8dab1492a4c53224e0b765.tar.xz zen-e6f44577f469e891ed8dab1492a4c53224e0b765.zip | |
added support for dynamic LLM tags (#245)
* added FLLMTag which can be used to register memory tags outside of core
* changed `UE_MEMSCOPE` -> `ZEN_MEMSCOPE` for consistency
* instrumented some subsystems with dynamic tags
Diffstat (limited to 'src/zenutil/openprocesscache.cpp')
| -rw-r--r-- | src/zenutil/openprocesscache.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/zenutil/openprocesscache.cpp b/src/zenutil/openprocesscache.cpp index 256d5fb4a..88bbce8a6 100644 --- a/src/zenutil/openprocesscache.cpp +++ b/src/zenutil/openprocesscache.cpp @@ -3,6 +3,7 @@ #include "zenutil/openprocesscache.h" #include <zencore/fmtutils.h> #include <zencore/logging.h> +#include <zencore/memory/llm.h> #if ZEN_PLATFORM_WINDOWS # include <zencore/windows.h> @@ -14,6 +15,14 @@ namespace zen { +const FLLMTag& +GetProcCacheTag() +{ + static FLLMTag CacheHttpTag("proccache"); + + return CacheHttpTag; +} + OpenProcessCache::OpenProcessCache() #if ZEN_PLATFORM_WINDOWS : m_GcThread(&OpenProcessCache::GcWorker, this) @@ -60,6 +69,9 @@ OpenProcessCache::GetProcessHandle(Oid SessionId, int ProcessPid) { return nullptr; } + + ZEN_MEMSCOPE(GetProcCacheTag()); + #if ZEN_PLATFORM_WINDOWS ZEN_ASSERT(ProcessPid != 0); { @@ -171,6 +183,8 @@ OpenProcessCache::GCHandles() void OpenProcessCache::GcWorker() { + ZEN_MEMSCOPE(GetProcCacheTag()); + SetCurrentThreadName("ProcessCache_GC"); while (!m_GcExitEvent.Wait(500)) |