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

Side by Side Diff: base/trace_event/trace_log.cc

Issue 2903323002: fuchsia: Don't reference CurrentProcessInfo::CreationTime() (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « base/process/process_info_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/trace_log.h" 5 #include "base/trace_event/trace_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 current_thread_id, "process_sort_index", 1493 current_thread_id, "process_sort_index",
1494 "sort_index", process_sort_index_); 1494 "sort_index", process_sort_index_);
1495 } 1495 }
1496 1496
1497 if (!process_name_.empty()) { 1497 if (!process_name_.empty()) {
1498 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), 1498 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
1499 current_thread_id, "process_name", "name", 1499 current_thread_id, "process_name", "name",
1500 process_name_); 1500 process_name_);
1501 } 1501 }
1502 1502
1503 #if !defined(OS_NACL) && !defined(OS_IOS) 1503 // See https://crbug.com/726484 for Fuchsia.
1504 #if !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_FUCHSIA)
1504 Time process_creation_time = CurrentProcessInfo::CreationTime(); 1505 Time process_creation_time = CurrentProcessInfo::CreationTime();
1505 if (!process_creation_time.is_null()) { 1506 if (!process_creation_time.is_null()) {
1506 TimeDelta process_uptime = Time::Now() - process_creation_time; 1507 TimeDelta process_uptime = Time::Now() - process_creation_time;
1507 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), 1508 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
1508 current_thread_id, "process_uptime_seconds", 1509 current_thread_id, "process_uptime_seconds",
1509 "uptime", process_uptime.InSeconds()); 1510 "uptime", process_uptime.InSeconds());
1510 } 1511 }
1511 #endif // !defined(OS_NACL) && !defined(OS_IOS) 1512 #endif // !defined(OS_NACL) && !defined(OS_IOS)
Lei Zhang 2017/05/25 21:36:17 Update to match.
scottmg 2017/05/25 21:42:15 Done.
1512 1513
1513 if (!process_labels_.empty()) { 1514 if (!process_labels_.empty()) {
1514 std::vector<base::StringPiece> labels; 1515 std::vector<base::StringPiece> labels;
1515 for (const auto& it : process_labels_) 1516 for (const auto& it : process_labels_)
1516 labels.push_back(it.second); 1517 labels.push_back(it.second);
1517 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), 1518 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
1518 current_thread_id, "process_labels", "labels", 1519 current_thread_id, "process_labels", "labels",
1519 base::JoinString(labels, ",")); 1520 base::JoinString(labels, ","));
1520 } 1521 }
1521 1522
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 } 1733 }
1733 1734
1734 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1735 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1735 if (*category_group_enabled_) { 1736 if (*category_group_enabled_) {
1736 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1737 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1737 event_handle_); 1738 event_handle_);
1738 } 1739 }
1739 } 1740 }
1740 1741
1741 } // namespace trace_event_internal 1742 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « base/process/process_info_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698