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

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: Use unresolved function 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') | no next file with comments »
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 INLINE(bool is_profiling() const) { return is_profiling_; } 249 INLINE(bool is_profiling() const) { return is_profiling_; }
240 bool* is_profiling_address() { 250 bool* is_profiling_address() {
241 return &is_profiling_; 251 return &is_profiling_;
242 } 252 }
243 253
244 private: 254 private:
245 void StartProcessorIfNotStarted(); 255 void StartProcessorIfNotStarted();
246 void StopProcessorIfLastProfile(const char* title); 256 void StopProcessorIfLastProfile(const char* title);
247 void StopProcessor(); 257 void StopProcessor();
248 void ResetProfiles(); 258 void ResetProfiles();
259 void LogBuiltins();
249 260
250 Isolate* isolate_; 261 Isolate* isolate_;
251 CpuProfilesCollection* profiles_; 262 CpuProfilesCollection* profiles_;
252 unsigned next_profile_uid_; 263 unsigned next_profile_uid_;
253 TokenEnumerator* token_enumerator_; 264 TokenEnumerator* token_enumerator_;
254 ProfileGenerator* generator_; 265 ProfileGenerator* generator_;
255 ProfilerEventsProcessor* processor_; 266 ProfilerEventsProcessor* processor_;
256 int saved_logging_nesting_; 267 int saved_logging_nesting_;
257 bool need_to_stop_sampler_; 268 bool need_to_stop_sampler_;
258 bool is_profiling_; 269 bool is_profiling_;
259 270
260 private: 271 private:
261 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 272 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
262 }; 273 };
263 274
264 } } // namespace v8::internal 275 } } // namespace v8::internal
265 276
266 277
267 #endif // V8_CPU_PROFILER_H_ 278 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698