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

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

Issue 19724007: Logger: introduce abstract interface for CodeEvent listeners. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « no previous file | src/log.h » ('j') | src/log.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 do { \ 177 do { \
178 Isolate* cpu_profiler_isolate = (IsolateGetter); \ 178 Isolate* cpu_profiler_isolate = (IsolateGetter); \
179 v8::internal::Logger* logger = cpu_profiler_isolate->logger(); \ 179 v8::internal::Logger* logger = cpu_profiler_isolate->logger(); \
180 CpuProfiler* cpu_profiler = cpu_profiler_isolate->cpu_profiler(); \ 180 CpuProfiler* cpu_profiler = cpu_profiler_isolate->cpu_profiler(); \
181 if (logger->is_logging_code_events() || cpu_profiler->is_profiling()) { \ 181 if (logger->is_logging_code_events() || cpu_profiler->is_profiling()) { \
182 logger->Call; \ 182 logger->Call; \
183 } \ 183 } \
184 } while (false) 184 } while (false)
185 185
186 186
187 class CpuProfiler { 187 class CpuProfiler : public CodeEventLoggerBase {
yurys 2013/07/24 09:15:40 Should we add virtual to the overrides for clarity
188 public: 188 public:
189 explicit CpuProfiler(Isolate* isolate); 189 explicit CpuProfiler(Isolate* isolate);
190 190
191 CpuProfiler(Isolate* isolate, 191 CpuProfiler(Isolate* isolate,
192 CpuProfilesCollection* test_collection, 192 CpuProfilesCollection* test_collection,
193 ProfileGenerator* test_generator, 193 ProfileGenerator* test_generator,
194 ProfilerEventsProcessor* test_processor); 194 ProfilerEventsProcessor* test_processor);
195 195
196 ~CpuProfiler(); 196 ~CpuProfiler();
197 197
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 bool is_profiling_; 259 bool is_profiling_;
260 260
261 private: 261 private:
262 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 262 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
263 }; 263 };
264 264
265 } } // namespace v8::internal 265 } } // namespace v8::internal
266 266
267 267
268 #endif // V8_CPU_PROFILER_H_ 268 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/log.h » ('j') | src/log.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698