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

Side by Side Diff: src/objects.cc

Issue 21593002: Propagate bailout reason to cpu profile node. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/objects.h ('k') | src/objects-inl.h » ('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 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 9795 matching lines...) Expand 10 before | Expand all | Expand 10 after
9806 9806
9807 void SharedFunctionInfo::DisableOptimization(const char* reason) { 9807 void SharedFunctionInfo::DisableOptimization(const char* reason) {
9808 // Disable optimization for the shared function info and mark the 9808 // Disable optimization for the shared function info and mark the
9809 // code as non-optimizable. The marker on the shared function info 9809 // code as non-optimizable. The marker on the shared function info
9810 // is there because we flush non-optimized code thereby loosing the 9810 // is there because we flush non-optimized code thereby loosing the
9811 // non-optimizable information for the code. When the code is 9811 // non-optimizable information for the code. When the code is
9812 // regenerated and set on the shared function info it is marked as 9812 // regenerated and set on the shared function info it is marked as
9813 // non-optimizable if optimization is disabled for the shared 9813 // non-optimizable if optimization is disabled for the shared
9814 // function info. 9814 // function info.
9815 set_optimization_disabled(true); 9815 set_optimization_disabled(true);
9816 MaybeObject* reason_object =
9817 Isolate::Current()->heap()->AllocateStringFromOneByte(
9818 CStrVector(reason));
9819 String* reason_string;
9820 if (reason_object->To<String>(&reason_string)) {
9821 set_bailout_reason(reason_string);
9822 }
9816 // Code should be the lazy compilation stub or else unoptimized. If the 9823 // Code should be the lazy compilation stub or else unoptimized. If the
9817 // latter, disable optimization for the code too. 9824 // latter, disable optimization for the code too.
9818 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); 9825 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
9819 if (code()->kind() == Code::FUNCTION) { 9826 if (code()->kind() == Code::FUNCTION) {
9820 code()->set_optimizable(false); 9827 code()->set_optimizable(false);
9821 } 9828 }
9822 if (FLAG_trace_opt) { 9829 if (FLAG_trace_opt) {
9823 PrintF("[disabled optimization for "); 9830 PrintF("[disabled optimization for ");
9824 ShortPrint(); 9831 ShortPrint();
9825 PrintF(", reason: %s]\n", reason); 9832 PrintF(", reason: %s]\n", reason);
(...skipping 6132 matching lines...) Expand 10 before | Expand all | Expand 10 after
15958 15965
15959 void PropertyCell::AddDependentCode(Handle<Code> code) { 15966 void PropertyCell::AddDependentCode(Handle<Code> code) {
15960 Handle<DependentCode> codes = DependentCode::Insert( 15967 Handle<DependentCode> codes = DependentCode::Insert(
15961 Handle<DependentCode>(dependent_code()), 15968 Handle<DependentCode>(dependent_code()),
15962 DependentCode::kPropertyCellChangedGroup, code); 15969 DependentCode::kPropertyCellChangedGroup, code);
15963 if (*codes != dependent_code()) set_dependent_code(*codes); 15970 if (*codes != dependent_code()) set_dependent_code(*codes);
15964 } 15971 }
15965 15972
15966 15973
15967 } } // namespace v8::internal 15974 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698