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

Side by Side Diff: src/objects.cc

Issue 10868106: Print reason for disabling optimization. Kill --trace-bailout flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified Created 8 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 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 7813 matching lines...) Expand 10 before | Expand all | Expand 10 after
7824 // TODO(3025757): In case the recompiled isn't equivalent to the 7824 // TODO(3025757): In case the recompiled isn't equivalent to the
7825 // old code, we have to replace it. We should try to avoid this 7825 // old code, we have to replace it. We should try to avoid this
7826 // altogether because it flushes valuable type feedback by 7826 // altogether because it flushes valuable type feedback by
7827 // effectively resetting all IC state. 7827 // effectively resetting all IC state.
7828 set_code(recompiled); 7828 set_code(recompiled);
7829 } 7829 }
7830 ASSERT(has_deoptimization_support()); 7830 ASSERT(has_deoptimization_support());
7831 } 7831 }
7832 7832
7833 7833
7834 void SharedFunctionInfo::DisableOptimization() { 7834 void SharedFunctionInfo::DisableOptimization(const char* reason) {
7835 // Disable optimization for the shared function info and mark the 7835 // Disable optimization for the shared function info and mark the
7836 // code as non-optimizable. The marker on the shared function info 7836 // code as non-optimizable. The marker on the shared function info
7837 // is there because we flush non-optimized code thereby loosing the 7837 // is there because we flush non-optimized code thereby loosing the
7838 // non-optimizable information for the code. When the code is 7838 // non-optimizable information for the code. When the code is
7839 // regenerated and set on the shared function info it is marked as 7839 // regenerated and set on the shared function info it is marked as
7840 // non-optimizable if optimization is disabled for the shared 7840 // non-optimizable if optimization is disabled for the shared
7841 // function info. 7841 // function info.
7842 set_optimization_disabled(true); 7842 set_optimization_disabled(true);
7843 // Code should be the lazy compilation stub or else unoptimized. If the 7843 // Code should be the lazy compilation stub or else unoptimized. If the
7844 // latter, disable optimization for the code too. 7844 // latter, disable optimization for the code too.
7845 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); 7845 ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
7846 if (code()->kind() == Code::FUNCTION) { 7846 if (code()->kind() == Code::FUNCTION) {
7847 code()->set_optimizable(false); 7847 code()->set_optimizable(false);
7848 } 7848 }
7849 if (FLAG_trace_opt) { 7849 if (FLAG_trace_opt) {
7850 PrintF("[disabled optimization for %s]\n", *DebugName()->ToCString()); 7850 PrintF("[disabled optimization for %s, reason: %s]\n",
7851 *DebugName()->ToCString(), reason);
7851 } 7852 }
7852 } 7853 }
7853 7854
7854 7855
7855 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) { 7856 bool SharedFunctionInfo::VerifyBailoutId(BailoutId id) {
7856 ASSERT(!id.IsNone()); 7857 ASSERT(!id.IsNone());
7857 Code* unoptimized = code(); 7858 Code* unoptimized = code();
7858 DeoptimizationOutputData* data = 7859 DeoptimizationOutputData* data =
7859 DeoptimizationOutputData::cast(unoptimized->deoptimization_data()); 7860 DeoptimizationOutputData::cast(unoptimized->deoptimization_data());
7860 unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this); 7861 unsigned ignore = Deoptimizer::GetOutputInfo(data, id, this);
(...skipping 5320 matching lines...) Expand 10 before | Expand all | Expand 10 after
13181 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13182 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13182 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13183 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13183 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13184 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13184 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13185 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13185 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13186 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13186 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13187 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13187 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13188 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13188 } 13189 }
13189 13190
13190 } } // namespace v8::internal 13191 } } // namespace v8::internal
OLDNEW
« src/lithium.cc ('K') | « src/objects.h ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698