aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/trace.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-04-13 14:05:03 +0200
committerGitHub Enterprise <[email protected]>2026-04-13 14:05:03 +0200
commitc49e5b15e0f86080d7d33e4e31aecfb701f8f96f (patch)
treeff41dcec20502c0cc4cf853222273f50d025cda3 /src/zencore/trace.cpp
parentAdd MemoryCidStore and ChunkStore interface (#940) (diff)
downloadzen-c49e5b15e0f86080d7d33e4e31aecfb701f8f96f.tar.xz
zen-c49e5b15e0f86080d7d33e4e31aecfb701f8f96f.zip
Some minor polish from tourist branch (#949)
- Replace per-type fmt::formatter specializations (StringBuilderBase, NiceBase) with a single generic formatter using a HasStringViewConversion concept - Add ThousandsNum for comma-separated integer formatting (e.g. "1,234,567") - Thread naming now accepts a sort hint for trace ordering - Fix main thread trace registration to use actual thread ID and sort first - Add ExpandEnvironmentVariables() for expanding %VAR% references in strings, with tests - Add ParseHexBytes() overload with expected byte count validation - Add Flag_BelowNormalPriority to CreateProcOptions (BELOW_NORMAL_PRIORITY_CLASS on Windows, setpriority on POSIX) - Add PrettyScroll progress bar mode that pins the status line to the bottom of the terminal using scroll regions, with signal handler cleanup for Ctrl+C/SIGTERM
Diffstat (limited to 'src/zencore/trace.cpp')
-rw-r--r--src/zencore/trace.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zencore/trace.cpp b/src/zencore/trace.cpp
index 7c195e69f..d7084bbd1 100644
--- a/src/zencore/trace.cpp
+++ b/src/zencore/trace.cpp
@@ -6,6 +6,7 @@
# include <zencore/zencore.h>
# include <zencore/commandline.h>
# include <zencore/string.h>
+# include <zencore/thread.h>
# include <zencore/logging.h>
# define TRACE_IMPLEMENT 1
@@ -121,7 +122,7 @@ TraceInit(std::string_view ProgramName)
const char* CommandLineString = "";
# endif
- trace::ThreadRegister("main", /* system id */ 0, /* sort id */ 0);
+ trace::ThreadRegister("main", /* system id */ GetCurrentThreadId(), /* sort id */ -1);
trace::DescribeSession(ProgramName,
# if ZEN_BUILD_DEBUG
trace::Build::Debug,