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

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

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Addressing code review feedback + rebase Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler.cc ('k') | src/global-handles.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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 bool running_; 190 bool running_;
191 UnboundQueue<CodeEventsContainer> events_buffer_; 191 UnboundQueue<CodeEventsContainer> events_buffer_;
192 SamplingCircularQueue ticks_buffer_; 192 SamplingCircularQueue ticks_buffer_;
193 UnboundQueue<TickSampleEventRecord> ticks_from_vm_buffer_; 193 UnboundQueue<TickSampleEventRecord> ticks_from_vm_buffer_;
194 unsigned enqueue_order_; 194 unsigned enqueue_order_;
195 }; 195 };
196 196
197 } } // namespace v8::internal 197 } } // namespace v8::internal
198 198
199 199
200 #define PROFILE(Call) \ 200 #define PROFILE(isolate, Call) \
201 LOG(Call); \ 201 LOG(isolate, Call); \
202 do { \ 202 do { \
203 if (v8::internal::CpuProfiler::is_profiling()) { \ 203 if (v8::internal::CpuProfiler::is_profiling()) { \
204 v8::internal::CpuProfiler::Call; \ 204 v8::internal::CpuProfiler::Call; \
205 } \ 205 } \
206 } while (false) 206 } while (false)
207 #else 207 #else
208 #define PROFILE(Call) LOG(Call) 208 #define PROFILE(isolate, Call) LOG(isolate, Call)
209 #endif // ENABLE_LOGGING_AND_PROFILING 209 #endif // ENABLE_LOGGING_AND_PROFILING
210 210
211 211
212 namespace v8 { 212 namespace v8 {
213 namespace internal { 213 namespace internal {
214 214
215 215
216 // TODO(isolates): isolatify this class. 216 // TODO(isolates): isolatify this class.
217 class CpuProfiler { 217 class CpuProfiler {
218 public: 218 public:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 #endif // ENABLE_LOGGING_AND_PROFILING 290 #endif // ENABLE_LOGGING_AND_PROFILING
291 291
292 private: 292 private:
293 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 293 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
294 }; 294 };
295 295
296 } } // namespace v8::internal 296 } } // namespace v8::internal
297 297
298 298
299 #endif // V8_CPU_PROFILER_H_ 299 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698