| OLD | NEW |
| 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 Loading... |
| 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 #if !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_FUCHSIA) |
| 1504 Time process_creation_time = CurrentProcessInfo::CreationTime(); | 1504 Time process_creation_time = CurrentProcessInfo::CreationTime(); |
| 1505 if (!process_creation_time.is_null()) { | 1505 if (!process_creation_time.is_null()) { |
| 1506 TimeDelta process_uptime = Time::Now() - process_creation_time; | 1506 TimeDelta process_uptime = Time::Now() - process_creation_time; |
| 1507 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), | 1507 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), |
| 1508 current_thread_id, "process_uptime_seconds", | 1508 current_thread_id, "process_uptime_seconds", |
| 1509 "uptime", process_uptime.InSeconds()); | 1509 "uptime", process_uptime.InSeconds()); |
| 1510 } | 1510 } |
| 1511 #endif // !defined(OS_NACL) && !defined(OS_IOS) | 1511 #endif // !defined(OS_NACL) && !defined(OS_IOS) |
| 1512 | 1512 |
| 1513 if (!process_labels_.empty()) { | 1513 if (!process_labels_.empty()) { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 } | 1732 } |
| 1733 | 1733 |
| 1734 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { | 1734 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { |
| 1735 if (*category_group_enabled_) { | 1735 if (*category_group_enabled_) { |
| 1736 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, | 1736 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, |
| 1737 event_handle_); | 1737 event_handle_); |
| 1738 } | 1738 } |
| 1739 } | 1739 } |
| 1740 | 1740 |
| 1741 } // namespace trace_event_internal | 1741 } // namespace trace_event_internal |
| OLD | NEW |