aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/utilities
diff options
context:
space:
mode:
authoradlertz <none@none>2013-09-19 18:01:39 +0200
committeradlertz <none@none>2013-09-19 18:01:39 +0200
commit37b6be42a85f45a85f6f0b4600d7fa8b50ef932d (patch)
treefa3dc610d2368814afcca453909cfe8e60b5d49e /src/share/vm/utilities
parent20a8a1e6e644a73040c0ae104b4a2242b7b88753 (diff)
parentb8e463007495736ef9a770b09b9568dbdbc66017 (diff)
Merge
Diffstat (limited to 'src/share/vm/utilities')
-rw-r--r--src/share/vm/utilities/ostream.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/share/vm/utilities/ostream.cpp b/src/share/vm/utilities/ostream.cpp
index 0ad9b9eb0..e4215504a 100644
--- a/src/share/vm/utilities/ostream.cpp
+++ b/src/share/vm/utilities/ostream.cpp
@@ -792,7 +792,7 @@ bool defaultStream::has_log_file() {
void defaultStream::init_log() {
// %%% Need a MutexLocker?
- const char* log_name = LogFile != NULL ? LogFile : "hotspot.log";
+ const char* log_name = LogFile != NULL ? LogFile : "hotspot_pid%p.log";
const char* try_name = make_log_name(log_name, NULL);
fileStream* file = new(ResourceObj::C_HEAP, mtInternal) fileStream(try_name);
if (!file->is_open()) {
@@ -803,14 +803,15 @@ void defaultStream::init_log() {
// Note: This feature is for maintainer use only. No need for L10N.
jio_print(warnbuf);
FREE_C_HEAP_ARRAY(char, try_name, mtInternal);
- try_name = make_log_name("hs_pid%p.log", os::get_temp_directory());
+ try_name = make_log_name(log_name, os::get_temp_directory());
jio_snprintf(warnbuf, sizeof(warnbuf),
"Warning: Forcing option -XX:LogFile=%s\n", try_name);
jio_print(warnbuf);
delete file;
file = new(ResourceObj::C_HEAP, mtInternal) fileStream(try_name);
- FREE_C_HEAP_ARRAY(char, try_name, mtInternal);
}
+ FREE_C_HEAP_ARRAY(char, try_name, mtInternal);
+
if (file->is_open()) {
_log_file = file;
xmlStream* xs = new(ResourceObj::C_HEAP, mtInternal) xmlStream(file);