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

Unified Diff: src/mips64/simulator-mips64.cc

Issue 2186533002: Remove dead code for generated code coverage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/simulator-mips64.cc
diff --git a/src/mips64/simulator-mips64.cc b/src/mips64/simulator-mips64.cc
index ed484ef2fbf0e2b764e840b5283d698c071fc5a6..2c022bd54e0d46b572f15626182379ec41bda403 100644
--- a/src/mips64/simulator-mips64.cc
+++ b/src/mips64/simulator-mips64.cc
@@ -66,7 +66,6 @@ static int64_t MultiplyHighSigned(int64_t u, int64_t v) {
class MipsDebugger {
public:
explicit MipsDebugger(Simulator* sim) : sim_(sim) { }
- ~MipsDebugger();
void Stop(Instruction* instr);
void Debug();
@@ -97,58 +96,8 @@ class MipsDebugger {
void RedoBreakpoints();
};
-
-MipsDebugger::~MipsDebugger() {
-}
-
-
-#ifdef GENERATED_CODE_COVERAGE
-static FILE* coverage_log = NULL;
-
-
-static void InitializeCoverage() {
- char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG");
- if (file_name != NULL) {
- coverage_log = fopen(file_name, "aw+");
- }
-}
-
-
-void MipsDebugger::Stop(Instruction* instr) {
- // Get the stop code.
- uint32_t code = instr->Bits(25, 6);
- // Retrieve the encoded address, which comes just after this stop.
- char** msg_address =
- reinterpret_cast<char**>(sim_->get_pc() + Instr::kInstrSize);
- char* msg = *msg_address;
- DCHECK(msg != NULL);
-
- // Update this stop description.
- if (!watched_stops_[code].desc) {
- watched_stops_[code].desc = msg;
- }
-
- if (strlen(msg) > 0) {
- if (coverage_log != NULL) {
- fprintf(coverage_log, "%s\n", str);
- fflush(coverage_log);
- }
- // Overwrite the instruction and address with nops.
- instr->SetInstructionBits(kNopInstr);
- reinterpret_cast<Instr*>(msg_address)->SetInstructionBits(kNopInstr);
- }
- // TODO(yuyin): 2 -> 3?
- sim_->set_pc(sim_->get_pc() + 3 * Instruction::kInstructionSize);
-}
-
-
-#else // GENERATED_CODE_COVERAGE
-
#define UNSUPPORTED() printf("Sim: Unsupported instruction.\n");
-static void InitializeCoverage() {}
-
-
void MipsDebugger::Stop(Instruction* instr) {
// Get the stop code.
uint32_t code = instr->Bits(25, 6);
@@ -164,8 +113,6 @@ void MipsDebugger::Stop(Instruction* instr) {
sim_->set_pc(sim_->get_pc() + 3 * Instruction::kInstrSize);
Debug();
}
-#endif // GENERATED_CODE_COVERAGE
-
int64_t MipsDebugger::GetRegisterValue(int regnum) {
if (regnum == kNumSimuRegisters) {
@@ -916,7 +863,6 @@ Simulator::Simulator(Isolate* isolate) : isolate_(isolate) {
// access violation if the simulator ever tries to execute it.
registers_[pc] = bad_ra;
registers_[ra] = bad_ra;
- InitializeCoverage();
last_debugger_input_ = NULL;
}
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698