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

Side by Side Diff: src/profile-generator.h

Issue 18422003: Correctly report callstack when current function is FunctionCall builtin (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « src/cpu-profiler-inl.h ('k') | src/profile-generator.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 INLINE(void set_script_id(int script_id)) { script_id_ = script_id; } 115 INLINE(void set_script_id(int script_id)) { script_id_ = script_id; }
116 INLINE(int security_token_id() const) { return security_token_id_; } 116 INLINE(int security_token_id() const) { return security_token_id_; }
117 117
118 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); 118 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag));
119 119
120 List<OffsetRange>* no_frame_ranges() const { return no_frame_ranges_; } 120 List<OffsetRange>* no_frame_ranges() const { return no_frame_ranges_; }
121 void set_no_frame_ranges(List<OffsetRange>* ranges) { 121 void set_no_frame_ranges(List<OffsetRange>* ranges) {
122 no_frame_ranges_ = ranges; 122 no_frame_ranges_ = ranges;
123 } 123 }
124 124
125 void SetBuiltinId(Builtins::Name id);
126 Builtins::Name builtin_id() const { return builtin_id_; }
127
125 void CopyData(const CodeEntry& source); 128 void CopyData(const CodeEntry& source);
126 uint32_t GetCallUid() const; 129 uint32_t GetCallUid() const;
127 bool IsSameAs(CodeEntry* entry) const; 130 bool IsSameAs(CodeEntry* entry) const;
128 131
129 static const char* const kEmptyNamePrefix; 132 static const char* const kEmptyNamePrefix;
130 static const char* const kEmptyResourceName; 133 static const char* const kEmptyResourceName;
131 134
132 private: 135 private:
133 Logger::LogEventsAndTags tag_; 136 Logger::LogEventsAndTags tag_ : 8;
137 Builtins::Name builtin_id_ : 8;
134 const char* name_prefix_; 138 const char* name_prefix_;
135 const char* name_; 139 const char* name_;
136 const char* resource_name_; 140 const char* resource_name_;
137 int line_number_; 141 int line_number_;
138 int shared_id_; 142 int shared_id_;
139 int script_id_; 143 int script_id_;
140 int security_token_id_; 144 int security_token_id_;
141 List<OffsetRange>* no_frame_ranges_; 145 List<OffsetRange>* no_frame_ranges_;
142 146
143 DISALLOW_COPY_AND_ASSIGN(CodeEntry); 147 DISALLOW_COPY_AND_ASSIGN(CodeEntry);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 INLINE(CodeMap* code_map()) { return &code_map_; } 422 INLINE(CodeMap* code_map()) { return &code_map_; }
419 423
420 INLINE(void Tick()) { sample_rate_calc_.Tick(); } 424 INLINE(void Tick()) { sample_rate_calc_.Tick(); }
421 INLINE(double actual_sampling_rate()) { 425 INLINE(double actual_sampling_rate()) {
422 return sample_rate_calc_.ticks_per_ms(); 426 return sample_rate_calc_.ticks_per_ms();
423 } 427 }
424 428
425 static const char* const kAnonymousFunctionName; 429 static const char* const kAnonymousFunctionName;
426 static const char* const kProgramEntryName; 430 static const char* const kProgramEntryName;
427 static const char* const kGarbageCollectorEntryName; 431 static const char* const kGarbageCollectorEntryName;
432 // Used to represent frames for which we have no reliable way to
433 // detect function.
434 static const char* const kUnresolvedFunctionName;
428 435
429 private: 436 private:
430 INLINE(CodeEntry* EntryForVMState(StateTag tag)); 437 INLINE(CodeEntry* EntryForVMState(StateTag tag));
431 438
432 CpuProfilesCollection* profiles_; 439 CpuProfilesCollection* profiles_;
433 CodeMap code_map_; 440 CodeMap code_map_;
434 CodeEntry* program_entry_; 441 CodeEntry* program_entry_;
435 CodeEntry* gc_entry_; 442 CodeEntry* gc_entry_;
443 CodeEntry* unresolved_entry_;
436 SampleRateCalculator sample_rate_calc_; 444 SampleRateCalculator sample_rate_calc_;
437 445
438 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); 446 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
439 }; 447 };
440 448
441 449
442 } } // namespace v8::internal 450 } } // namespace v8::internal
443 451
444 #endif // V8_PROFILE_GENERATOR_H_ 452 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler-inl.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698