| Index: src/mips64/simulator-mips64.cc
|
| diff --git a/src/mips64/simulator-mips64.cc b/src/mips64/simulator-mips64.cc
|
| index 86e8b91464eacbd74a54294a7a14fee232673782..bcc502f001ef0e544fd531c3eea201ecd2f6783c 100644
|
| --- a/src/mips64/simulator-mips64.cc
|
| +++ b/src/mips64/simulator-mips64.cc
|
| @@ -111,11 +111,17 @@ static FILE* coverage_log = NULL;
|
|
|
| static void InitializeCoverage() {
|
| char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG");
|
| - if (file_name != NULL) {
|
| + if (file_name != NULL && NULL == coverage_log) {
|
| coverage_log = fopen(file_name, "aw+");
|
| }
|
| }
|
|
|
| +static void DeinitCoverageLog() {
|
| + if (coverage_log != NULL) {
|
| + fclose(coverage_log);
|
| + coverage_log = NULL;
|
| + }
|
| +}
|
|
|
| void MipsDebugger::Stop(Instruction* instr) {
|
| // Get the stop code.
|
| @@ -150,6 +156,7 @@ void MipsDebugger::Stop(Instruction* instr) {
|
| #define UNSUPPORTED() printf("Unsupported instruction.\n");
|
|
|
| static void InitializeCoverage() {}
|
| +static void DeinitCoverageLog() {}
|
|
|
|
|
| void MipsDebugger::Stop(Instruction* instr) {
|
|
|