Reviewers: Michael Starzinger (Google),
Message:
log: add %p option to --logfile, expands to pid
Useful when you are profiling multiple instances of V8 concurrently.
Description:
log: add %p option to --logfile, expands to pid
Please review this at https://codereview.chromium.org/12093008/
Affected files:
M src/log-utils.cc
Index: src/log-utils.cc
diff --git a/src/log-utils.cc b/src/log-utils.cc
index
d8d92cbe211607f03e2a6f131f6f2f481b47f023..a66db3d931e9fe5d99edfba39b81ec8418099a89
100644
--- a/src/log-utils.cc
+++ b/src/log-utils.cc
@@ -107,6 +107,9 @@ void Log::Initialize() {
// one character so we can escape the loop properly.
p--;
break;
+ case 'p':
+ stream.Add("%d", OS::GetCurrentProcessId());
+ break;
case 't': {
// %t expands to the current time in milliseconds.
double time = OS::TimeCurrentMillis();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev