Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3129)

Unified Diff: base/debug/trace_event_impl.cc

Issue 277883002: Add cpu count to trace metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/debug/trace_event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index a01a10358fa5ca60af72174eb1f11215f4894a51..8bcbe0e45ef55f79ea0c0c81596fdca402afd15f 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -2049,6 +2049,14 @@ void TraceLog::CancelWatchEvent() {
void TraceLog::AddMetadataEventsWhileLocked() {
lock_.AssertAcquired();
+#if !defined(OS_NACL) // NaCl shouldn't expose the process id.
Ruud van Asseldonk 2015/12/02 17:00:54 Either the comment is wrong, or the #if should not
+ InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+ 0,
+ "num_cpus", "number",
+ base::SysInfo::NumberOfProcessors());
+#endif
+
+
int current_thread_id = static_cast<int>(base::PlatformThread::CurrentId());
if (process_sort_index_ != 0) {
InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
« no previous file with comments | « no previous file | base/debug/trace_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698