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

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

Issue 19683005: MIPS: Improve code aging sequence. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/mips/assembler-mips.h ('k') | src/mips/full-codegen-mips.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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 static byte* GetNoCodeAgeSequence(uint32_t* length) { 596 static byte* GetNoCodeAgeSequence(uint32_t* length) {
597 // The sequence of instructions that is patched out for aging code is the 597 // The sequence of instructions that is patched out for aging code is the
598 // following boilerplate stack-building prologue that is found in FUNCTIONS 598 // following boilerplate stack-building prologue that is found in FUNCTIONS
599 static bool initialized = false; 599 static bool initialized = false;
600 static uint32_t sequence[kNoCodeAgeSequenceLength]; 600 static uint32_t sequence[kNoCodeAgeSequenceLength];
601 byte* byte_sequence = reinterpret_cast<byte*>(sequence); 601 byte* byte_sequence = reinterpret_cast<byte*>(sequence);
602 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; 602 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize;
603 if (!initialized) { 603 if (!initialized) {
604 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); 604 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength);
605 patcher.masm()->Push(ra, fp, cp, a1); 605 patcher.masm()->Push(ra, fp, cp, a1);
606 patcher.masm()->LoadRoot(at, Heap::kUndefinedValueRootIndex); 606 patcher.masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP);
607 patcher.masm()->Addu(fp, sp, Operand(2 * kPointerSize)); 607 patcher.masm()->Addu(fp, sp, Operand(2 * kPointerSize));
608 initialized = true; 608 initialized = true;
609 } 609 }
610 return byte_sequence; 610 return byte_sequence;
611 } 611 }
612 612
613 613
614 bool Code::IsYoungSequence(byte* sequence) { 614 bool Code::IsYoungSequence(byte* sequence) {
615 uint32_t young_length; 615 uint32_t young_length;
616 byte* young_sequence = GetNoCodeAgeSequence(&young_length); 616 byte* young_sequence = GetNoCodeAgeSequence(&young_length);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); 659 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start()));
660 } 660 }
661 } 661 }
662 662
663 663
664 #undef __ 664 #undef __
665 665
666 } } // namespace v8::internal 666 } } // namespace v8::internal
667 667
668 #endif // V8_TARGET_ARCH_MIPS 668 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698