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 "ui/gl/angle_platform_impl.h" | 5 #include "ui/gl/angle_platform_impl.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... | |
37 double timestamp, | 37 double timestamp, |
38 int num_args, | 38 int num_args, |
39 const char** arg_names, | 39 const char** arg_names, |
40 const unsigned char* arg_types, | 40 const unsigned char* arg_types, |
41 const unsigned long long* arg_values, | 41 const unsigned long long* arg_values, |
42 unsigned char flags) { | 42 unsigned char flags) { |
43 base::TraceTicks timestamp_tt = | 43 base::TraceTicks timestamp_tt = |
44 base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp); | 44 base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp); |
45 base::trace_event::TraceEventHandle handle = | 45 base::trace_event::TraceEventHandle handle = |
46 TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP( | 46 TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP( |
47 phase, category_group_enabled, name, id, trace_event_internal::kNoId, | 47 phase, |
48 base::PlatformThread::CurrentId(), timestamp_tt, num_args, arg_names, | 48 category_group_enabled, |
49 arg_types, arg_values, nullptr, flags); | 49 name, |
50 id, | |
51 trace_event_internal::kNoId, | |
52 base::PlatformThread::CurrentId(), | |
beaudoin
2015/07/27 18:34:14
EOL comments?
| |
53 timestamp_tt, | |
54 num_args, | |
55 arg_names, | |
56 arg_types, | |
57 arg_values, | |
58 NULL, | |
59 flags); | |
50 angle::Platform::TraceEventHandle result; | 60 angle::Platform::TraceEventHandle result; |
51 memcpy(&result, &handle, sizeof(result)); | 61 memcpy(&result, &handle, sizeof(result)); |
52 return result; | 62 return result; |
53 } | 63 } |
54 | 64 |
55 void ANGLEPlatformImpl::updateTraceEventDuration( | 65 void ANGLEPlatformImpl::updateTraceEventDuration( |
56 const unsigned char* category_group_enabled, | 66 const unsigned char* category_group_enabled, |
57 const char* name, | 67 const char* name, |
58 TraceEventHandle handle) { | 68 TraceEventHandle handle) { |
59 base::trace_event::TraceEventHandle trace_event_handle; | 69 base::trace_event::TraceEventHandle trace_event_handle; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 // For sparse histograms, we can use the macro, as it does not incorporate a | 102 // For sparse histograms, we can use the macro, as it does not incorporate a |
93 // static. | 103 // static. |
94 UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample); | 104 UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample); |
95 } | 105 } |
96 | 106 |
97 void ANGLEPlatformImpl::histogramBoolean(const char* name, bool sample) { | 107 void ANGLEPlatformImpl::histogramBoolean(const char* name, bool sample) { |
98 histogramEnumeration(name, sample ? 1 : 0, 2); | 108 histogramEnumeration(name, sample ? 1 : 0, 2); |
99 } | 109 } |
100 | 110 |
101 } // namespace gfx | 111 } // namespace gfx |
OLD | NEW |