Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: sky/engine/platform/EventTracer.h

Issue 893503002: Remove unused trace sampling states (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/Init.cpp ('k') | sky/engine/platform/EventTracer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 typedef uint64_t TraceEventHandle; 43 typedef uint64_t TraceEventHandle;
44 44
45 class PLATFORM_EXPORT ConvertableToTraceFormat : public RefCounted<ConvertableTo TraceFormat> { 45 class PLATFORM_EXPORT ConvertableToTraceFormat : public RefCounted<ConvertableTo TraceFormat> {
46 public: 46 public:
47 virtual String asTraceFormat() const = 0; 47 virtual String asTraceFormat() const = 0;
48 virtual ~ConvertableToTraceFormat() { } 48 virtual ~ConvertableToTraceFormat() { }
49 }; 49 };
50 50
51 } 51 }
52 52
53 // FIXME: Make these global variables thread-safe. Make a value update atomic.
54 PLATFORM_EXPORT extern long* traceSamplingState[3];
55
56 class PLATFORM_EXPORT EventTracer { 53 class PLATFORM_EXPORT EventTracer {
57 public: 54 public:
58 static void initialize();
59 static const unsigned char* getTraceCategoryEnabledFlag(const char*); 55 static const unsigned char* getTraceCategoryEnabledFlag(const char*);
60 static TraceEvent::TraceEventHandle addTraceEvent(char phase, 56 static TraceEvent::TraceEventHandle addTraceEvent(char phase,
61 const unsigned char* categoryEnabledFlag, 57 const unsigned char* categoryEnabledFlag,
62 const char* name, 58 const char* name,
63 unsigned long long id, 59 unsigned long long id,
64 int numArgs, 60 int numArgs,
65 const char* argNames[], 61 const char* argNames[],
66 const unsigned char argTypes[], 62 const unsigned char argTypes[],
67 const unsigned long long argValues[], 63 const unsigned long long argValues[],
68 TraceEvent::ConvertableToTraceFormat*[], 64 TraceEvent::ConvertableToTraceFormat*[],
69 unsigned char flags); 65 unsigned char flags);
70 static TraceEvent::TraceEventHandle addTraceEvent(char phase, 66 static TraceEvent::TraceEventHandle addTraceEvent(char phase,
71 const unsigned char* categoryEnabledFlag, 67 const unsigned char* categoryEnabledFlag,
72 const char* name, 68 const char* name,
73 unsigned long long id, 69 unsigned long long id,
74 int numArgs, 70 int numArgs,
75 const char* argNames[], 71 const char* argNames[],
76 const unsigned char argTypes[], 72 const unsigned char argTypes[],
77 const unsigned long long argValues[], 73 const unsigned long long argValues[],
78 unsigned char flags); 74 unsigned char flags);
79 static void updateTraceEventDuration(const unsigned char* categoryEnabledFla g, const char* name, TraceEvent::TraceEventHandle); 75 static void updateTraceEventDuration(const unsigned char* categoryEnabledFla g, const char* name, TraceEvent::TraceEventHandle);
80 }; 76 };
81 77
82 } // namespace blink 78 } // namespace blink
83 79
84 #endif // SKY_ENGINE_PLATFORM_EVENTTRACER_H_ 80 #endif // SKY_ENGINE_PLATFORM_EVENTTRACER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/Init.cpp ('k') | sky/engine/platform/EventTracer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698