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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/full-codegen.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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 Comment cmnt(masm_, "[ Back edge bookkeeping"); 354 Comment cmnt(masm_, "[ Back edge bookkeeping");
355 // Block literal pools whilst emitting back edge code. 355 // Block literal pools whilst emitting back edge code.
356 Assembler::BlockConstPoolScope block_const_pool(masm_); 356 Assembler::BlockConstPoolScope block_const_pool(masm_);
357 Label ok; 357 Label ok;
358 358
359 int weight = 1; 359 int weight = 1;
360 if (FLAG_weighted_back_edges) { 360 if (FLAG_weighted_back_edges) {
361 ASSERT(back_edge_target->is_bound()); 361 ASSERT(back_edge_target->is_bound());
362 int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); 362 int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target);
363 weight = Min(kMaxBackEdgeWeight, 363 weight = Min(kMaxBackEdgeWeight,
364 Max(1, distance / kBackEdgeDistanceUnit)); 364 Max(1, distance / kCodeSizeMultiplier));
365 } 365 }
366 EmitProfilingCounterDecrement(weight); 366 EmitProfilingCounterDecrement(weight);
367 __ b(pl, &ok); 367 __ b(pl, &ok);
368 InterruptStub stub; 368 InterruptStub stub;
369 __ CallStub(&stub); 369 __ CallStub(&stub);
370 370
371 // Record a mapping of this PC offset to the OSR id. This is used to find 371 // Record a mapping of this PC offset to the OSR id. This is used to find
372 // the AST id from the unoptimized code in order to use it as a key into 372 // the AST id from the unoptimized code in order to use it as a key into
373 // the deoptimization input data found in the optimized code. 373 // the deoptimization input data found in the optimized code.
374 RecordBackEdge(stmt->OsrEntryId()); 374 RecordBackEdge(stmt->OsrEntryId());
(...skipping 22 matching lines...) Expand all
397 __ CallRuntime(Runtime::kTraceExit, 1); 397 __ CallRuntime(Runtime::kTraceExit, 1);
398 } 398 }
399 if (FLAG_interrupt_at_exit || FLAG_self_optimization) { 399 if (FLAG_interrupt_at_exit || FLAG_self_optimization) {
400 // Pretend that the exit is a backwards jump to the entry. 400 // Pretend that the exit is a backwards jump to the entry.
401 int weight = 1; 401 int weight = 1;
402 if (info_->ShouldSelfOptimize()) { 402 if (info_->ShouldSelfOptimize()) {
403 weight = FLAG_interrupt_budget / FLAG_self_opt_count; 403 weight = FLAG_interrupt_budget / FLAG_self_opt_count;
404 } else if (FLAG_weighted_back_edges) { 404 } else if (FLAG_weighted_back_edges) {
405 int distance = masm_->pc_offset(); 405 int distance = masm_->pc_offset();
406 weight = Min(kMaxBackEdgeWeight, 406 weight = Min(kMaxBackEdgeWeight,
407 Max(1, distance / kBackEdgeDistanceUnit)); 407 Max(1, distance / kCodeSizeMultiplier));
408 } 408 }
409 EmitProfilingCounterDecrement(weight); 409 EmitProfilingCounterDecrement(weight);
410 Label ok; 410 Label ok;
411 __ b(pl, &ok); 411 __ b(pl, &ok);
412 __ push(r0); 412 __ push(r0);
413 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) { 413 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) {
414 __ ldr(r2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 414 __ ldr(r2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
415 __ push(r2); 415 __ push(r2);
416 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1); 416 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1);
417 } else { 417 } else {
(...skipping 4475 matching lines...) Expand 10 before | Expand all | Expand 10 after
4893 *context_length = 0; 4893 *context_length = 0;
4894 return previous_; 4894 return previous_;
4895 } 4895 }
4896 4896
4897 4897
4898 #undef __ 4898 #undef __
4899 4899
4900 } } // namespace v8::internal 4900 } } // namespace v8::internal
4901 4901
4902 #endif // V8_TARGET_ARCH_ARM 4902 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698