hotspot/src/share/vm/compiler/compileLog.cpp
changeset 27709 e6f02d6fee44
parent 25715 d5a8dbdc5150
child 27883 3179632c8f66
equal deleted inserted replaced
27708:8a8710cb8fc4 27709:e6f02d6fee44
    54     _first = this;
    54     _first = this;
    55   }
    55   }
    56 }
    56 }
    57 
    57 
    58 CompileLog::~CompileLog() {
    58 CompileLog::~CompileLog() {
    59   delete _out;
    59   delete _out; // Close fd in fileStream::~fileStream()
    60   _out = NULL;
    60   _out = NULL;
       
    61   // Remove partial file after merging in CompileLog::finish_log_on_error
       
    62   unlink(_file);
    61   FREE_C_HEAP_ARRAY(char, _identities, mtCompiler);
    63   FREE_C_HEAP_ARRAY(char, _identities, mtCompiler);
    62   FREE_C_HEAP_ARRAY(char, _file, mtCompiler);
    64   FREE_C_HEAP_ARRAY(char, _file, mtCompiler);
    63 }
    65 }
    64 
    66 
    65 
    67 
   276         file->print_raw_cr("]]>");
   278         file->print_raw_cr("]]>");
   277         file->print_raw_cr("</fragment>");
   279         file->print_raw_cr("</fragment>");
   278       }
   280       }
   279       file->print_raw_cr("</compilation_log>");
   281       file->print_raw_cr("</compilation_log>");
   280       close(partial_fd);
   282       close(partial_fd);
   281       unlink(partial_file);
       
   282     }
   283     }
   283     CompileLog* next_log = log->_next;
   284     CompileLog* next_log = log->_next;
   284     delete log;
   285     delete log; // Removes partial file
   285     log = next_log;
   286     log = next_log;
   286   }
   287   }
   287   _first = NULL;
   288   _first = NULL;
   288 }
   289 }
   289 
   290