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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 typedef uint64_t TraceEventHandle; | 57 typedef uint64_t TraceEventHandle; |
58 typedef intptr_t TraceEventAPIAtomicWord; | 58 typedef intptr_t TraceEventAPIAtomicWord; |
59 | 59 |
60 class PLATFORM_EXPORT ConvertableToTraceFormat : public RefCounted<ConvertableTo
TraceFormat> { | 60 class PLATFORM_EXPORT ConvertableToTraceFormat : public RefCounted<ConvertableTo
TraceFormat> { |
61 public: | 61 public: |
62 virtual String asTraceFormat() const = 0; | 62 virtual String asTraceFormat() const = 0; |
63 virtual ~ConvertableToTraceFormat() { } | 63 virtual ~ConvertableToTraceFormat() { } |
64 virtual void estimateTraceMemoryOverhead(base::trace_event::TraceEventMemory
Overhead*) { } | 64 virtual void estimateTraceMemoryOverhead(base::trace_event::TraceEventMemory
Overhead*) { } |
65 }; | 65 }; |
66 | 66 |
67 } | 67 } // namespace TraceEvent |
68 | 68 |
69 // FIXME: Make these global variables thread-safe. Make a value update atomic. | 69 // FIXME: Make these global variables thread-safe. Make a value update atomic. |
70 PLATFORM_EXPORT extern TraceEvent::TraceEventAPIAtomicWord* traceSamplingState[3
]; | 70 PLATFORM_EXPORT extern TraceEvent::TraceEventAPIAtomicWord* traceSamplingState[3
]; |
71 | 71 |
72 class PLATFORM_EXPORT EventTracer { | 72 class PLATFORM_EXPORT EventTracer { |
73 STATIC_ONLY(EventTracer); | 73 STATIC_ONLY(EventTracer); |
74 public: | 74 public: |
75 static void initialize(); | 75 static void initialize(); |
76 static const unsigned char* getTraceCategoryEnabledFlag(const char*); | 76 static const unsigned char* getTraceCategoryEnabledFlag(const char*); |
77 static TraceEvent::TraceEventHandle addTraceEvent(char phase, | 77 static TraceEvent::TraceEventHandle addTraceEvent(char phase, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const char* argNames[], | 112 const char* argNames[], |
113 const unsigned char argTypes[], | 113 const unsigned char argTypes[], |
114 const unsigned long long argValues[], | 114 const unsigned long long argValues[], |
115 const scoped_refptr<base::trace_event::ConvertableToTraceFormat>* conver
tables, | 115 const scoped_refptr<base::trace_event::ConvertableToTraceFormat>* conver
tables, |
116 unsigned flags); | 116 unsigned flags); |
117 }; | 117 }; |
118 | 118 |
119 } // namespace blink | 119 } // namespace blink |
120 | 120 |
121 #endif // EventTracer_h | 121 #endif // EventTracer_h |
OLD | NEW |