Chromium Code Reviews| 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, | |
|
dsinclair
2015/07/21 18:11:49
This shouldn't need to change because we added the
yuhaoz
2015/07/21 18:22:34
Same as the ppapi case. I removed the kNoId that f
| |
| 51 base::PlatformThread::CurrentId(), | |
| 52 timestamp_tt, | |
| 53 num_args, | |
| 54 arg_names, | |
| 55 arg_types, | |
| 56 arg_values, | |
| 57 NULL, | |
|
vmpstr
2015/07/21 18:03:41
nit: keep nullptr, please.
| |
| 58 flags); | |
| 50 angle::Platform::TraceEventHandle result; | 59 angle::Platform::TraceEventHandle result; |
| 51 memcpy(&result, &handle, sizeof(result)); | 60 memcpy(&result, &handle, sizeof(result)); |
| 52 return result; | 61 return result; |
| 53 } | 62 } |
| 54 | 63 |
| 55 void ANGLEPlatformImpl::updateTraceEventDuration( | 64 void ANGLEPlatformImpl::updateTraceEventDuration( |
| 56 const unsigned char* category_group_enabled, | 65 const unsigned char* category_group_enabled, |
| 57 const char* name, | 66 const char* name, |
| 58 TraceEventHandle handle) { | 67 TraceEventHandle handle) { |
| 59 base::trace_event::TraceEventHandle trace_event_handle; | 68 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 | 101 // For sparse histograms, we can use the macro, as it does not incorporate a |
| 93 // static. | 102 // static. |
| 94 UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample); | 103 UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample); |
| 95 } | 104 } |
| 96 | 105 |
| 97 void ANGLEPlatformImpl::histogramBoolean(const char* name, bool sample) { | 106 void ANGLEPlatformImpl::histogramBoolean(const char* name, bool sample) { |
| 98 histogramEnumeration(name, sample ? 1 : 0, 2); | 107 histogramEnumeration(name, sample ? 1 : 0, 2); |
| 99 } | 108 } |
| 100 | 109 |
| 101 } // namespace gfx | 110 } // namespace gfx |
| OLD | NEW |