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

Unified Diff: src/mips/simulator-mips.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/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/simulator-mips.cc
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc
index 71dcda276646a2bed2257d4d2166b40f82b1a8d2..38f792d9efd80707f52f4ce62813916c56e5d1a0 100644
--- a/src/mips/simulator-mips.cc
+++ b/src/mips/simulator-mips.cc
@@ -51,7 +51,6 @@ uint32_t get_fcsr_condition_bit(uint32_t cc) {
class MipsDebugger {
public:
explicit MipsDebugger(Simulator* sim) : sim_(sim) { }
- ~MipsDebugger();
void Stop(Instruction* instr);
void Debug();
@@ -85,55 +84,8 @@ class MipsDebugger {
};
-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);
- }
- sim_->set_pc(sim_->get_pc() + 2 * 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.
@@ -149,7 +101,6 @@ void MipsDebugger::Stop(Instruction* instr) {
sim_->set_pc(sim_->get_pc() + 2 * Instruction::kInstrSize);
Debug();
}
-#endif // GENERATED_CODE_COVERAGE
int32_t MipsDebugger::GetRegisterValue(int regnum) {
@@ -977,7 +928,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/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698