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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 78953003: Add counters for write barriers in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported partially to ARM and MIPS architectures. Created 7 years, 1 month 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/ia32/macro-assembler-ia32.cc » ('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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 LinkRegisterStatus lr_status, 477 LinkRegisterStatus lr_status,
478 SaveFPRegsMode fp_mode, 478 SaveFPRegsMode fp_mode,
479 RememberedSetAction remembered_set_action, 479 RememberedSetAction remembered_set_action,
480 SmiCheck smi_check) { 480 SmiCheck smi_check) {
481 if (emit_debug_code()) { 481 if (emit_debug_code()) {
482 ldr(ip, MemOperand(address)); 482 ldr(ip, MemOperand(address));
483 cmp(ip, value); 483 cmp(ip, value);
484 Check(eq, kWrongAddressOrValuePassedToRecordWrite); 484 Check(eq, kWrongAddressOrValuePassedToRecordWrite);
485 } 485 }
486 486
487 // Count number of write barriers in generated code.
488 isolate()->counters()->write_barriers_static()->Increment();
489 // TODO(mstarzinger): Dynamic counter missing.
490
491 // First, check if a write barrier is even needed. The tests below
492 // catch stores of smis and stores into the young generation.
487 Label done; 493 Label done;
488 494
489 if (smi_check == INLINE_SMI_CHECK) { 495 if (smi_check == INLINE_SMI_CHECK) {
490 JumpIfSmi(value, &done); 496 JumpIfSmi(value, &done);
491 } 497 }
492 498
493 CheckPageFlag(value, 499 CheckPageFlag(value,
494 value, // Used as scratch. 500 value, // Used as scratch.
495 MemoryChunk::kPointersToHereAreInterestingMask, 501 MemoryChunk::kPointersToHereAreInterestingMask,
496 eq, 502 eq,
(...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3966 void CodePatcher::EmitCondition(Condition cond) { 3972 void CodePatcher::EmitCondition(Condition cond) {
3967 Instr instr = Assembler::instr_at(masm_.pc_); 3973 Instr instr = Assembler::instr_at(masm_.pc_);
3968 instr = (instr & ~kCondMask) | cond; 3974 instr = (instr & ~kCondMask) | cond;
3969 masm_.emit(instr); 3975 masm_.emit(instr);
3970 } 3976 }
3971 3977
3972 3978
3973 } } // namespace v8::internal 3979 } } // namespace v8::internal
3974 3980
3975 #endif // V8_TARGET_ARCH_ARM 3981 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698