X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_writer_local.hpp;h=358455a955a6d2bfe6c0fdd409a734e04a5e312d;hb=712cc1db47e56a1032dc72d4209ffc9054ec54e4;hp=cc5dda0115eb425e462d12203bbb2c2bc4e65cd1;hpb=7a9fb5103e052150232b64cb5d99374cda3f1234;p=apitrace diff --git a/common/trace_writer_local.hpp b/common/trace_writer_local.hpp index cc5dda0..358455a 100644 --- a/common/trace_writer_local.hpp +++ b/common/trace_writer_local.hpp @@ -34,6 +34,7 @@ #include #include "os_thread.hpp" +#include "os_process.hpp" #include "trace_writer.hpp" @@ -70,6 +71,13 @@ namespace trace { os::recursive_mutex mutex; int acquired; + /** + * ID of the processed that opened the trace file. + */ + os::ProcessId pid; + + void checkProcessId(); + public: /** * Should never called directly -- use localWriter singleton below @@ -83,8 +91,8 @@ namespace trace { /** * It will acquire the mutex. */ - unsigned beginEnter(const FunctionSig *sig); - + unsigned beginEnter(const FunctionSig *sig, bool fake = false); + /** * It will release the mutex. */