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

Side by Side Diff: src/cpu-profiler.h

Issue 1084009: Add a few tests to ProfilerEventsProcessor. (Closed)
Patch Set: Created 10 years, 9 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 | « no previous file | src/profile-generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // This class implements both the profile events processor thread and 121 // This class implements both the profile events processor thread and
122 // methods called by event producers: VM and stack sampler threads. 122 // methods called by event producers: VM and stack sampler threads.
123 class ProfilerEventsProcessor : public Thread { 123 class ProfilerEventsProcessor : public Thread {
124 public: 124 public:
125 explicit ProfilerEventsProcessor(ProfileGenerator* generator); 125 explicit ProfilerEventsProcessor(ProfileGenerator* generator);
126 virtual ~ProfilerEventsProcessor() { } 126 virtual ~ProfilerEventsProcessor() { }
127 127
128 // Thread control. 128 // Thread control.
129 virtual void Run(); 129 virtual void Run();
130 inline void Stop() { running_ = false; } 130 inline void Stop() { running_ = false; }
131 INLINE(bool running()) { return running_; }
131 132
132 // Events adding methods. Called by VM threads. 133 // Events adding methods. Called by VM threads.
133 void CodeCreateEvent(Logger::LogEventsAndTags tag, 134 void CodeCreateEvent(Logger::LogEventsAndTags tag,
134 String* name, 135 String* name,
135 String* resource_name, int line_number, 136 String* resource_name, int line_number,
136 Address start, unsigned size); 137 Address start, unsigned size);
137 void CodeCreateEvent(Logger::LogEventsAndTags tag, 138 void CodeCreateEvent(Logger::LogEventsAndTags tag,
138 const char* name, 139 const char* name,
139 Address start, unsigned size); 140 Address start, unsigned size);
140 void CodeCreateEvent(Logger::LogEventsAndTags tag, 141 void CodeCreateEvent(Logger::LogEventsAndTags tag,
(...skipping 30 matching lines...) Expand all
171 bool running_; 172 bool running_;
172 CircularQueue<CodeEventsContainer> events_buffer_; 173 CircularQueue<CodeEventsContainer> events_buffer_;
173 SamplingCircularQueue ticks_buffer_; 174 SamplingCircularQueue ticks_buffer_;
174 unsigned enqueue_order_; 175 unsigned enqueue_order_;
175 }; 176 };
176 177
177 178
178 } } // namespace v8::internal 179 } } // namespace v8::internal
179 180
180 #endif // V8_CPU_PROFILER_H_ 181 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698