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

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

Issue 18316004: Correctly report callstack when current function is FunctionCall builtin (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed empty line Created 7 years, 5 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/cpu-profiler.cc » ('j') | src/cpu-profiler-inl.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class CodeMap; 42 class CodeMap;
43 class CompilationInfo; 43 class CompilationInfo;
44 class CpuProfile; 44 class CpuProfile;
45 class CpuProfilesCollection; 45 class CpuProfilesCollection;
46 class ProfileGenerator; 46 class ProfileGenerator;
47 class TokenEnumerator; 47 class TokenEnumerator;
48 48
49 #define CODE_EVENTS_TYPE_LIST(V) \ 49 #define CODE_EVENTS_TYPE_LIST(V) \
50 V(CODE_CREATION, CodeCreateEventRecord) \ 50 V(CODE_CREATION, CodeCreateEventRecord) \
51 V(CODE_MOVE, CodeMoveEventRecord) \ 51 V(CODE_MOVE, CodeMoveEventRecord) \
52 V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) 52 V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) \
53 V(REPORT_BUILTIN, ReportBuiltinEventRecord)
53 54
54 55
55 class CodeEventRecord { 56 class CodeEventRecord {
56 public: 57 public:
57 #define DECLARE_TYPE(type, ignore) type, 58 #define DECLARE_TYPE(type, ignore) type,
58 enum Type { 59 enum Type {
59 NONE = 0, 60 NONE = 0,
60 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE) 61 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE)
61 NUMBER_OF_TYPES 62 NUMBER_OF_TYPES
62 }; 63 };
(...skipping 26 matching lines...) Expand all
89 90
90 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord { 91 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord {
91 public: 92 public:
92 Address from; 93 Address from;
93 Address to; 94 Address to;
94 95
95 INLINE(void UpdateCodeMap(CodeMap* code_map)); 96 INLINE(void UpdateCodeMap(CodeMap* code_map));
96 }; 97 };
97 98
98 99
100 class ReportBuiltinEventRecord : public CodeEventRecord {
101 public:
102 Address start;
103 Builtins::Name builtin_id;
104
105 INLINE(void UpdateCodeMap(CodeMap* code_map));
106 };
107
108
99 class TickSampleEventRecord { 109 class TickSampleEventRecord {
100 public: 110 public:
101 // The parameterless constructor is used when we dequeue data from 111 // The parameterless constructor is used when we dequeue data from
102 // the ticks buffer. 112 // the ticks buffer.
103 TickSampleEventRecord() { } 113 TickSampleEventRecord() { }
104 explicit TickSampleEventRecord(unsigned order) 114 explicit TickSampleEventRecord(unsigned order)
105 : filler(1), 115 : filler(1),
106 order(order) { 116 order(order) {
107 ASSERT(filler != SamplingCircularQueue::kClear); 117 ASSERT(filler != SamplingCircularQueue::kClear);
108 } 118 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 INLINE(bool is_profiling() const) { return is_profiling_; } 251 INLINE(bool is_profiling() const) { return is_profiling_; }
242 bool* is_profiling_address() { 252 bool* is_profiling_address() {
243 return &is_profiling_; 253 return &is_profiling_;
244 } 254 }
245 255
246 private: 256 private:
247 void StartProcessorIfNotStarted(); 257 void StartProcessorIfNotStarted();
248 void StopProcessorIfLastProfile(const char* title); 258 void StopProcessorIfLastProfile(const char* title);
249 void StopProcessor(); 259 void StopProcessor();
250 void ResetProfiles(); 260 void ResetProfiles();
261 void LogBuiltins();
251 262
252 Isolate* isolate_; 263 Isolate* isolate_;
253 CpuProfilesCollection* profiles_; 264 CpuProfilesCollection* profiles_;
254 unsigned next_profile_uid_; 265 unsigned next_profile_uid_;
255 TokenEnumerator* token_enumerator_; 266 TokenEnumerator* token_enumerator_;
256 ProfileGenerator* generator_; 267 ProfileGenerator* generator_;
257 ProfilerEventsProcessor* processor_; 268 ProfilerEventsProcessor* processor_;
258 int saved_logging_nesting_; 269 int saved_logging_nesting_;
259 bool need_to_stop_sampler_; 270 bool need_to_stop_sampler_;
260 bool is_profiling_; 271 bool is_profiling_;
261 272
262 private: 273 private:
263 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 274 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
264 }; 275 };
265 276
266 } } // namespace v8::internal 277 } } // namespace v8::internal
267 278
268 279
269 #endif // V8_CPU_PROFILER_H_ 280 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/cpu-profiler.cc » ('j') | src/cpu-profiler-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698