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

Side by Side Diff: src/objects.cc

Issue 23817003: Propagate bailout and dont_optimize reasons to cpu-profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed Created 7 years, 3 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 14 matching lines...) Expand all
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 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "accessors.h" 30 #include "accessors.h"
31 #include "api.h" 31 #include "api.h"
32 #include "arguments.h" 32 #include "arguments.h"
33 #include "bootstrapper.h" 33 #include "bootstrapper.h"
34 #include "codegen.h" 34 #include "codegen.h"
35 #include "cpu-profiler.h"
35 #include "debug.h" 36 #include "debug.h"
36 #include "deoptimizer.h" 37 #include "deoptimizer.h"
37 #include "date.h" 38 #include "date.h"
38 #include "elements.h" 39 #include "elements.h"
39 #include "execution.h" 40 #include "execution.h"
40 #include "full-codegen.h" 41 #include "full-codegen.h"
41 #include "hydrogen.h" 42 #include "hydrogen.h"
42 #include "isolate-inl.h" 43 #include "isolate-inl.h"
44 #include "log.h"
43 #include "objects-inl.h" 45 #include "objects-inl.h"
44 #include "objects-visiting.h" 46 #include "objects-visiting.h"
45 #include "objects-visiting-inl.h" 47 #include "objects-visiting-inl.h"
46 #include "macro-assembler.h" 48 #include "macro-assembler.h"
47 #include "mark-compact.h" 49 #include "mark-compact.h"
48 #include "safepoint-table.h" 50 #include "safepoint-table.h"
49 #include "string-stream.h" 51 #include "string-stream.h"
50 #include "utils.h" 52 #include "utils.h"
51 53
52 #ifdef ENABLE_DISASSEMBLER 54 #ifdef ENABLE_DISASSEMBLER
(...skipping 9789 matching lines...) Expand 10 before | Expand all | Expand 10 after
9842 9844
9843 void SharedFunctionInfo::DisableOptimization(BailoutReason reason) { 9845 void SharedFunctionInfo::DisableOptimization(BailoutReason reason) {
9844 // Disable optimization for the shared function info and mark the 9846 // Disable optimization for the shared function info and mark the
9845 // code as non-optimizable. The marker on the shared function info 9847 // code as non-optimizable. The marker on the shared function info
9846 // is there because we flush non-optimized code thereby loosing the 9848 // is there because we flush non-optimized code thereby loosing the
9847 // non-optimizable information for the code. When the code is 9849 // non-optimizable information for the code. When the code is
9848 // regenerated and set on the shared function info it is marked as 9850 // regenerated and set on the shared function info it is marked as
9849 // non-optimizable if optimization is disabled for the shared 9851 // non-optimizable if optimization is disabled for the shared
9850 // function info. 9852 // function info.
9851 set_optimization_disabled(true); 9853 set_optimization_disabled(true);
9854 set_bailout_reason(reason);
9852 // Code should be the lazy compilation stub or else unoptimized. If the 9855 // Code should be the lazy compilation stub or else unoptimized. If the
9853 // latter, disable optimization for the code too. 9856 // latter, disable optimization for the code too.
9854 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); 9857 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
9855 if (code()->kind() == Code::FUNCTION) { 9858 if (code()->kind() == Code::FUNCTION) {
9856 code()->set_optimizable(false); 9859 code()->set_optimizable(false);
9857 } 9860 }
9861 PROFILE(Isolate::Current(),
9862 LogExistingFunction(Handle<SharedFunctionInfo>(this),
9863 Handle<Code>(code())));
9858 if (FLAG_trace_opt) { 9864 if (FLAG_trace_opt) {
9859 PrintF("[disabled optimization for "); 9865 PrintF("[disabled optimization for ");
9860 ShortPrint(); 9866 ShortPrint();
9861 PrintF(", reason: %s]\n", GetBailoutReason(reason)); 9867 PrintF(", reason: %s]\n", GetBailoutReason(reason));
9862 } 9868 }
9863 } 9869 }
9864 9870
9865 9871
9866 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) { 9872 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) {
9867 ASSERT(!id.IsNone()); 9873 ASSERT(!id.IsNone());
(...skipping 6168 matching lines...) Expand 10 before | Expand all | Expand 10 after
16036 #define ERROR_MESSAGES_TEXTS(C, T) T, 16042 #define ERROR_MESSAGES_TEXTS(C, T) T,
16037 static const char* error_messages_[] = { 16043 static const char* error_messages_[] = {
16038 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16044 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16039 }; 16045 };
16040 #undef ERROR_MESSAGES_TEXTS 16046 #undef ERROR_MESSAGES_TEXTS
16041 return error_messages_[reason]; 16047 return error_messages_[reason];
16042 } 16048 }
16043 16049
16044 16050
16045 } } // namespace v8::internal 16051 } } // namespace v8::internal
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698