< prev index next >
src/share/vm/services/memoryService.cpp
Print this page
*** 30,39 ****
--- 30,40 ----
#include "gc/serial/tenuredGeneration.hpp"
#include "gc/shared/collectorPolicy.hpp"
#include "gc/shared/genCollectedHeap.hpp"
#include "gc/shared/generation.hpp"
#include "gc/shared/generationSpec.hpp"
+ #include "logging/logConfiguration.hpp"
#include "memory/heap.hpp"
#include "memory/memRegion.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/globals.hpp"
#include "runtime/javaCalls.hpp"
*** 515,526 ****
}
bool MemoryService::set_verbose(bool verbose) {
MutexLocker m(Management_lock);
// verbose will be set to the previous value
! Flag::Error error = CommandLineFlags::boolAtPut("PrintGC", &verbose, Flag::MANAGEMENT);
! assert(error==Flag::SUCCESS, "Setting PrintGC flag failed with error %s", Flag::flag_error_str(error));
ClassLoadingService::reset_trace_class_unloading();
return verbose;
}
--- 516,530 ----
}
bool MemoryService::set_verbose(bool verbose) {
MutexLocker m(Management_lock);
// verbose will be set to the previous value
! if (verbose) {
! LogConfiguration::parse_log_arguments("stdout", "gc", NULL, NULL, NULL);
! } else {
! LogConfiguration::parse_log_arguments("stdout", "gc=off", NULL, NULL, NULL);
! }
ClassLoadingService::reset_trace_class_unloading();
return verbose;
}
< prev index next >