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

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

Issue 7206015: Fix issue 1354: Bad function name inference. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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
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 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifdef ENABLE_LOGGING_AND_PROFILING 28 #ifdef ENABLE_LOGGING_AND_PROFILING
29 29
30 #include "v8.h" 30 #include "v8.h"
31 31
32 #include "profile-generator-inl.h" 32 #include "profile-generator-inl.h"
33 33
34 #include "func-name-inferrer.h"
34 #include "global-handles.h" 35 #include "global-handles.h"
35 #include "heap-profiler.h" 36 #include "heap-profiler.h"
36 #include "scopeinfo.h" 37 #include "scopeinfo.h"
37 #include "unicode.h" 38 #include "unicode.h"
38 #include "zone-inl.h" 39 #include "zone-inl.h"
39 40
40 namespace v8 { 41 namespace v8 {
41 namespace internal { 42 namespace internal {
42 43
43 44
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 // Update the externally accessible result. 819 // Update the externally accessible result.
819 result_ = static_cast<AtomicWord>(ticks_per_ms_ * kResultScale); 820 result_ = static_cast<AtomicWord>(ticks_per_ms_ * kResultScale);
820 } 821 }
821 last_wall_time_ = current_time; 822 last_wall_time_ = current_time;
822 wall_time_query_countdown_ = 823 wall_time_query_countdown_ =
823 static_cast<unsigned>(kWallTimeQueryIntervalMs * ticks_per_ms_); 824 static_cast<unsigned>(kWallTimeQueryIntervalMs * ticks_per_ms_);
824 } 825 }
825 826
826 827
827 const char* const ProfileGenerator::kAnonymousFunctionName = 828 const char* const ProfileGenerator::kAnonymousFunctionName =
828 "(anonymous function)"; 829 FuncNameInferrer::kAnonymousFunctionName;
829 const char* const ProfileGenerator::kProgramEntryName = 830 const char* const ProfileGenerator::kProgramEntryName =
830 "(program)"; 831 "(program)";
831 const char* const ProfileGenerator::kGarbageCollectorEntryName = 832 const char* const ProfileGenerator::kGarbageCollectorEntryName =
832 "(garbage collector)"; 833 "(garbage collector)";
833 834
834 835
835 ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles) 836 ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles)
836 : profiles_(profiles), 837 : profiles_(profiles),
837 program_entry_( 838 program_entry_(
838 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)), 839 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)),
(...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3186 3187
3187 3188
3188 String* GetConstructorNameForHeapProfile(JSObject* object) { 3189 String* GetConstructorNameForHeapProfile(JSObject* object) {
3189 if (object->IsJSFunction()) return HEAP->closure_symbol(); 3190 if (object->IsJSFunction()) return HEAP->closure_symbol();
3190 return object->constructor_name(); 3191 return object->constructor_name();
3191 } 3192 }
3192 3193
3193 } } // namespace v8::internal 3194 } } // namespace v8::internal
3194 3195
3195 #endif // ENABLE_LOGGING_AND_PROFILING 3196 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« src/func-name-inferrer.cc ('K') | « src/parser.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698