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

Side by Side Diff: src/compiler.cc

Issue 9691042: Change --hydrogen-filter to allow specifying a negative filter for optimized functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 (info->osr_ast_id() != AstNode::kNoNumber && 237 (info->osr_ast_id() != AstNode::kNoNumber &&
238 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) { 238 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) {
239 info->AbortOptimization(); 239 info->AbortOptimization();
240 info->shared_info()->DisableOptimization(); 240 info->shared_info()->DisableOptimization();
241 // True indicates the compilation pipeline is still going, not 241 // True indicates the compilation pipeline is still going, not
242 // necessarily that we optimized the code. 242 // necessarily that we optimized the code.
243 return true; 243 return true;
244 } 244 }
245 245
246 // Take --hydrogen-filter into account. 246 // Take --hydrogen-filter into account.
247 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
248 Handle<String> name = info->function()->debug_name(); 247 Handle<String> name = info->function()->debug_name();
249 bool match = filter.is_empty() || name->IsEqualTo(filter); 248 if (*FLAG_hydrogen_filter) {
Sven Panne 2012/03/14 07:35:36 If this is allowed, I'll immediately start writing
fschneider 2012/03/14 08:34:59 I don't know about that, but I can compare it to \
250 if (!match) { 249 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
251 info->SetCode(code); 250 ASSERT(!filter.is_empty());
Sven Panne 2012/03/14 07:35:36 I don't think we need this assertion when the corr
fschneider 2012/03/14 08:34:59 Done.
252 return true; 251 if ((filter[0] == '-'
252 && name->IsEqualTo(filter.SubVector(1, filter.length())))
253 || (filter[0] != '-' && !name->IsEqualTo(filter))) {
254 info->SetCode(code);
255 return true;
256 }
253 } 257 }
254 258
255 // Recompile the unoptimized version of the code if the current version 259 // Recompile the unoptimized version of the code if the current version
256 // doesn't have deoptimization support. Alternatively, we may decide to 260 // doesn't have deoptimization support. Alternatively, we may decide to
257 // run the full code generator to get a baseline for the compile-time 261 // run the full code generator to get a baseline for the compile-time
258 // performance of the hydrogen-based compiler. 262 // performance of the hydrogen-based compiler.
259 int64_t start = OS::Ticks(); 263 int64_t start = OS::Ticks();
260 bool should_recompile = !info->shared_info()->has_deoptimization_support(); 264 bool should_recompile = !info->shared_info()->has_deoptimization_support();
261 if (should_recompile || FLAG_hydrogen_stats) { 265 if (should_recompile || FLAG_hydrogen_stats) {
262 HPhase phase(HPhase::kFullCodeGen); 266 HPhase phase(HPhase::kFullCodeGen);
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 806 }
803 } 807 }
804 808
805 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 809 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
806 Handle<Script>(info->script()), 810 Handle<Script>(info->script()),
807 Handle<Code>(info->code()), 811 Handle<Code>(info->code()),
808 info)); 812 info));
809 } 813 }
810 814
811 } } // namespace v8::internal 815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698