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

Side by Side Diff: src/mips/macro-assembler-mips.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 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/macro-assembler-ia32.cc ('k') | src/v8-counters.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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 SmiCheck smi_check) { 248 SmiCheck smi_check) {
249 ASSERT(!AreAliased(object, address, value, t8)); 249 ASSERT(!AreAliased(object, address, value, t8));
250 ASSERT(!AreAliased(object, address, value, t9)); 250 ASSERT(!AreAliased(object, address, value, t9));
251 251
252 if (emit_debug_code()) { 252 if (emit_debug_code()) {
253 lw(at, MemOperand(address)); 253 lw(at, MemOperand(address));
254 Assert( 254 Assert(
255 eq, kWrongAddressOrValuePassedToRecordWrite, at, Operand(value)); 255 eq, kWrongAddressOrValuePassedToRecordWrite, at, Operand(value));
256 } 256 }
257 257
258 // Count number of write barriers in generated code.
259 isolate()->counters()->write_barriers_static()->Increment();
260 // TODO(mstarzinger): Dynamic counter missing.
261
262 // First, check if a write barrier is even needed. The tests below
263 // catch stores of smis and stores into the young generation.
258 Label done; 264 Label done;
259 265
260 if (smi_check == INLINE_SMI_CHECK) { 266 if (smi_check == INLINE_SMI_CHECK) {
261 ASSERT_EQ(0, kSmiTag); 267 ASSERT_EQ(0, kSmiTag);
262 JumpIfSmi(value, &done); 268 JumpIfSmi(value, &done);
263 } 269 }
264 270
265 CheckPageFlag(value, 271 CheckPageFlag(value,
266 value, // Used as scratch. 272 value, // Used as scratch.
267 MemoryChunk::kPointersToHereAreInterestingMask, 273 MemoryChunk::kPointersToHereAreInterestingMask,
(...skipping 5406 matching lines...) Expand 10 before | Expand all | Expand 10 after
5674 opcode == BGTZL); 5680 opcode == BGTZL);
5675 opcode = (cond == eq) ? BEQ : BNE; 5681 opcode = (cond == eq) ? BEQ : BNE;
5676 instr = (instr & ~kOpcodeMask) | opcode; 5682 instr = (instr & ~kOpcodeMask) | opcode;
5677 masm_.emit(instr); 5683 masm_.emit(instr);
5678 } 5684 }
5679 5685
5680 5686
5681 } } // namespace v8::internal 5687 } } // namespace v8::internal
5682 5688
5683 #endif // V8_TARGET_ARCH_MIPS 5689 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698