[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-22 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5bf02815d8b: [TimeProfiler] Emit real process ID and thread names (authored by broadwaylamb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78027/new/ http

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-16 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb marked an inline comment as done. broadwaylamb added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:222 +J.attribute("pid", Pid); +J.attribute("tid", int64_t(Tid)); +J.attribute("ts", 0); MaskRay wrote: > This

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: llvm/lib/Support/TimeProfiler.cpp:222 +J.attribute("pid", Pid); +J.attribute("tid", int64_t(Tid)); +J.attribute("ts", 0); --

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-16 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb updated this revision to Diff 258059. broadwaylamb added a comment. Fix coding style CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78027/new/ https://reviews.llvm.org/D78027 Files: clang/test/Driver/check-time-trace.cpp lld/test/ELF/time-trace.s llvm/lib/Support/Time

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:249 + +for (const auto &TTP : ThreadTimeTraceProfilerInstances) { + writeMetadataEvent("thread_name", TTP->Tid, TTP->ThreadName); MaskRay wrote: > broadwaylamb wrote: > > MaskRa

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:77 +static std::string getThreadName() { + SmallString<64> Name; broadwaylamb wrote: > MaskRay wrote: > > You can define ThreadName as `SmallString<0>` to avoid this function. > Then

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb marked 2 inline comments as done. broadwaylamb added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:77 +static std::string getThreadName() { + SmallString<64> Name; MaskRay wrote: > You can define ThreadName as `SmallString<0>` to

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: llvm/lib/Support/TimeProfiler.cpp:77 +static std::string getThreadName() { + SmallString<64> Name; You can define ThreadName a

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Russell Gallop via Phabricator via cfe-commits
russell.gallop accepted this revision. russell.gallop added a comment. This revision is now accepted and ready to land. Would be nice if the test could check that the pid was being set to something but not sure how you could do that (beyond checking that it's a number). Apart from that, LGTM.

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-13 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb updated this revision to Diff 257015. broadwaylamb added a comment. Explicitly specify argument types in `writeMetadataEvent` lambda. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78027/new/ https://reviews.llvm.org/D78027 Files: clang/test/Driver/check-time-trace.cpp

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-13 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb updated this revision to Diff 256993. broadwaylamb added a comment. Remove unrelated changes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78027/new/ https://reviews.llvm.org/D78027 Files: clang/test/Driver/check-time-trace.cpp lld/test/ELF/time-trace.s llvm/lib/Supp

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-13 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb created this revision. broadwaylamb added reviewers: anton-afanasyev, russell.gallop. Herald added subscribers: cfe-commits, MaskRay, hiraditya, emaste. Herald added a reviewer: espindola. Herald added a project: clang. broadwaylamb added a parent revision: D78022: Introduce llvm::sys