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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 17030008: Inhibit OSR for big functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/ia32/full-codegen-ia32.cc ('k') | src/runtime-profiler.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 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // sequence is about as long as this Branch would be so it is safe to ignore 356 // sequence is about as long as this Branch would be so it is safe to ignore
357 // that. 357 // that.
358 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 358 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
359 Comment cmnt(masm_, "[ Back edge bookkeeping"); 359 Comment cmnt(masm_, "[ Back edge bookkeeping");
360 Label ok; 360 Label ok;
361 int weight = 1; 361 int weight = 1;
362 if (FLAG_weighted_back_edges) { 362 if (FLAG_weighted_back_edges) {
363 ASSERT(back_edge_target->is_bound()); 363 ASSERT(back_edge_target->is_bound());
364 int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); 364 int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target);
365 weight = Min(kMaxBackEdgeWeight, 365 weight = Min(kMaxBackEdgeWeight,
366 Max(1, distance / kBackEdgeDistanceUnit)); 366 Max(1, distance / kCodeSizeMultiplier));
367 } 367 }
368 EmitProfilingCounterDecrement(weight); 368 EmitProfilingCounterDecrement(weight);
369 __ slt(at, a3, zero_reg); 369 __ slt(at, a3, zero_reg);
370 __ beq(at, zero_reg, &ok); 370 __ beq(at, zero_reg, &ok);
371 // CallStub will emit a li t9 first, so it is safe to use the delay slot. 371 // CallStub will emit a li t9 first, so it is safe to use the delay slot.
372 InterruptStub stub; 372 InterruptStub stub;
373 __ CallStub(&stub); 373 __ CallStub(&stub);
374 // Record a mapping of this PC offset to the OSR id. This is used to find 374 // Record a mapping of this PC offset to the OSR id. This is used to find
375 // the AST id from the unoptimized code in order to use it as a key into 375 // the AST id from the unoptimized code in order to use it as a key into
376 // the deoptimization input data found in the optimized code. 376 // the deoptimization input data found in the optimized code.
(...skipping 22 matching lines...) Expand all
399 __ CallRuntime(Runtime::kTraceExit, 1); 399 __ CallRuntime(Runtime::kTraceExit, 1);
400 } 400 }
401 if (FLAG_interrupt_at_exit || FLAG_self_optimization) { 401 if (FLAG_interrupt_at_exit || FLAG_self_optimization) {
402 // Pretend that the exit is a backwards jump to the entry. 402 // Pretend that the exit is a backwards jump to the entry.
403 int weight = 1; 403 int weight = 1;
404 if (info_->ShouldSelfOptimize()) { 404 if (info_->ShouldSelfOptimize()) {
405 weight = FLAG_interrupt_budget / FLAG_self_opt_count; 405 weight = FLAG_interrupt_budget / FLAG_self_opt_count;
406 } else if (FLAG_weighted_back_edges) { 406 } else if (FLAG_weighted_back_edges) {
407 int distance = masm_->pc_offset(); 407 int distance = masm_->pc_offset();
408 weight = Min(kMaxBackEdgeWeight, 408 weight = Min(kMaxBackEdgeWeight,
409 Max(1, distance / kBackEdgeDistanceUnit)); 409 Max(1, distance / kCodeSizeMultiplier));
410 } 410 }
411 EmitProfilingCounterDecrement(weight); 411 EmitProfilingCounterDecrement(weight);
412 Label ok; 412 Label ok;
413 __ Branch(&ok, ge, a3, Operand(zero_reg)); 413 __ Branch(&ok, ge, a3, Operand(zero_reg));
414 __ push(v0); 414 __ push(v0);
415 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) { 415 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) {
416 __ lw(a2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 416 __ lw(a2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
417 __ push(a2); 417 __ push(a2);
418 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1); 418 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1);
419 } else { 419 } else {
(...skipping 4507 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 *context_length = 0; 4927 *context_length = 0;
4928 return previous_; 4928 return previous_;
4929 } 4929 }
4930 4930
4931 4931
4932 #undef __ 4932 #undef __
4933 4933
4934 } } // namespace v8::internal 4934 } } // namespace v8::internal
4935 4935
4936 #endif // V8_TARGET_ARCH_MIPS 4936 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698