OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 { | 69 { |
70 static const char* dummyCategoryEnabledFlag = "*"; | 70 static const char* dummyCategoryEnabledFlag = "*"; |
71 // current() might not exist in unit tests. | 71 // current() might not exist in unit tests. |
72 if (!Platform::current()) | 72 if (!Platform::current()) |
73 return reinterpret_cast<const unsigned char*>(dummyCategoryEnabledFlag); | 73 return reinterpret_cast<const unsigned char*>(dummyCategoryEnabledFlag); |
74 | 74 |
75 return Platform::current()->getTraceCategoryEnabledFlag(categoryName); | 75 return Platform::current()->getTraceCategoryEnabledFlag(categoryName); |
76 } | 76 } |
77 | 77 |
78 TraceEvent::TraceEventHandle EventTracer::addTraceEvent(char phase, const unsign
ed char* categoryEnabledFlag, | 78 TraceEvent::TraceEventHandle EventTracer::addTraceEvent(char phase, const unsign
ed char* categoryEnabledFlag, |
79 const char* name, unsigned long long id, double timestamp, | 79 const char* name, unsigned long long id, unsigned long long bindId, double t
imestamp, |
80 int numArgs, const char* argNames[], const unsigned char argTypes[], | 80 int numArgs, const char* argNames[], const unsigned char argTypes[], |
81 const unsigned long long argValues[], | 81 const unsigned long long argValues[], |
82 PassRefPtr<TraceEvent::ConvertableToTraceFormat> convertableValue1, | 82 PassRefPtr<TraceEvent::ConvertableToTraceFormat> convertableValue1, |
83 PassRefPtr<TraceEvent::ConvertableToTraceFormat> convertableValue2, | 83 PassRefPtr<TraceEvent::ConvertableToTraceFormat> convertableValue2, |
84 unsigned char flags) | 84 unsigned flags) |
85 { | 85 { |
86 WebConvertableToTraceFormat webConvertableValues[2]; | 86 WebConvertableToTraceFormat webConvertableValues[2]; |
87 webConvertableValues[0] = WebConvertableToTraceFormat(convertableValue1); | 87 webConvertableValues[0] = WebConvertableToTraceFormat(convertableValue1); |
88 webConvertableValues[1] = WebConvertableToTraceFormat(convertableValue2); | 88 webConvertableValues[1] = WebConvertableToTraceFormat(convertableValue2); |
89 return Platform::current()->addTraceEvent(phase, categoryEnabledFlag, name,
id, timestamp, numArgs, argNames, argTypes, argValues, webConvertableValues, fla
gs); | 89 return Platform::current()->addTraceEvent(phase, categoryEnabledFlag, name,
id, bindId, timestamp, numArgs, argNames, argTypes, argValues, webConvertableVal
ues, flags); |
90 } | 90 } |
91 | 91 |
92 TraceEvent::TraceEventHandle EventTracer::addTraceEvent(char phase, const unsign
ed char* categoryEnabledFlag, | 92 TraceEvent::TraceEventHandle EventTracer::addTraceEvent(char phase, const unsign
ed char* categoryEnabledFlag, |
93 const char* name, unsigned long long id, double timestamp, | 93 const char* name, unsigned long long id, unsigned long long bindId, double t
imestamp, |
94 int numArgs, const char** argNames, const unsigned char* argTypes, | 94 int numArgs, const char** argNames, const unsigned char* argTypes, |
95 const unsigned long long* argValues, unsigned char flags) | 95 const unsigned long long* argValues, unsigned flags) |
96 { | 96 { |
97 return Platform::current()->addTraceEvent(phase, categoryEnabledFlag, name,
id, timestamp, numArgs, argNames, argTypes, argValues, 0, flags); | 97 return Platform::current()->addTraceEvent(phase, categoryEnabledFlag, name,
id, bindId, timestamp, numArgs, argNames, argTypes, argValues, 0, flags); |
98 } | 98 } |
99 | 99 |
100 void EventTracer::updateTraceEventDuration(const unsigned char* categoryEnabledF
lag, const char* name, TraceEvent::TraceEventHandle handle) | 100 void EventTracer::updateTraceEventDuration(const unsigned char* categoryEnabledF
lag, const char* name, TraceEvent::TraceEventHandle handle) |
101 { | 101 { |
102 Platform::current()->updateTraceEventDuration(categoryEnabledFlag, name, han
dle); | 102 Platform::current()->updateTraceEventDuration(categoryEnabledFlag, name, han
dle); |
103 } | 103 } |
104 | 104 |
105 } // namespace blink | 105 } // namespace blink |
OLD | NEW |