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

Side by Side Diff: src/compiler.cc

Issue 6646015: Normalize statistics about compilation time and allocation size.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | src/flag-definitions.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 info->SetCode(code); 241 info->SetCode(code);
242 return true; 242 return true;
243 } 243 }
244 244
245 // Recompile the unoptimized version of the code if the current version 245 // Recompile the unoptimized version of the code if the current version
246 // doesn't have deoptimization support. Alternatively, we may decide to 246 // doesn't have deoptimization support. Alternatively, we may decide to
247 // run the full code generator to get a baseline for the compile-time 247 // run the full code generator to get a baseline for the compile-time
248 // performance of the hydrogen-based compiler. 248 // performance of the hydrogen-based compiler.
249 int64_t start = OS::Ticks(); 249 int64_t start = OS::Ticks();
250 bool should_recompile = !info->shared_info()->has_deoptimization_support(); 250 bool should_recompile = !info->shared_info()->has_deoptimization_support();
251 if (should_recompile || FLAG_time_hydrogen) { 251 if (should_recompile || FLAG_hydrogen_stats) {
252 HPhase phase(HPhase::kFullCodeGen); 252 HPhase phase(HPhase::kFullCodeGen);
253 CompilationInfo unoptimized(info->shared_info()); 253 CompilationInfo unoptimized(info->shared_info());
254 // Note that we use the same AST that we will use for generating the 254 // Note that we use the same AST that we will use for generating the
255 // optimized code. 255 // optimized code.
256 unoptimized.SetFunction(info->function()); 256 unoptimized.SetFunction(info->function());
257 unoptimized.SetScope(info->scope()); 257 unoptimized.SetScope(info->scope());
258 if (should_recompile) unoptimized.EnableDeoptimizationSupport(); 258 if (should_recompile) unoptimized.EnableDeoptimizationSupport();
259 bool succeeded = FullCodeGenerator::MakeCode(&unoptimized); 259 bool succeeded = FullCodeGenerator::MakeCode(&unoptimized);
260 if (should_recompile) { 260 if (should_recompile) {
261 if (!succeeded) return false; 261 if (!succeeded) return false;
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 shared->DebugName())); 797 shared->DebugName()));
798 } 798 }
799 } 799 }
800 800
801 GDBJIT(AddCode(name, 801 GDBJIT(AddCode(name,
802 Handle<Script>(info->script()), 802 Handle<Script>(info->script()),
803 Handle<Code>(info->code()))); 803 Handle<Code>(info->code())));
804 } 804 }
805 805
806 } } // namespace v8::internal 806 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698