--- old/src/share/vm/services/classLoadingService.cpp 2015-06-13 09:00:32.000000000 -0500 +++ new/src/share/vm/services/classLoadingService.cpp 2015-06-13 09:00:32.000000000 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ #include "services/memoryService.hpp" #include "utilities/dtrace.hpp" #include "utilities/macros.hpp" +#include "utilities/defaultStream.hpp" #ifdef DTRACE_ENABLED @@ -176,13 +177,12 @@ return class_size * oopSize; } - bool ClassLoadingService::set_verbose(bool verbose) { MutexLocker m(Management_lock); // verbose will be set to the previous value - bool succeed = CommandLineFlags::boolAtPut((char*)"TraceClassLoading", &verbose, Flag::MANAGEMENT); - assert(succeed, "Setting TraceClassLoading flag fails"); + Flag::Error error = CommandLineFlags::boolAtPut("TraceClassLoading", &verbose, Flag::MANAGEMENT); + assert(error==Flag::SUCCESS, err_msg("Setting TraceClassLoading flag failed with error %s", Flag::flag_error_str(error))); reset_trace_class_unloading(); return verbose; @@ -192,8 +192,8 @@ void ClassLoadingService::reset_trace_class_unloading() { assert(Management_lock->owned_by_self(), "Must own the Management_lock"); bool value = MemoryService::get_verbose() || ClassLoadingService::get_verbose(); - bool succeed = CommandLineFlags::boolAtPut((char*)"TraceClassUnloading", &value, Flag::MANAGEMENT); - assert(succeed, "Setting TraceClassUnLoading flag fails"); + Flag::Error error = CommandLineFlags::boolAtPut("TraceClassUnloading", &value, Flag::MANAGEMENT); + assert(error==Flag::SUCCESS, err_msg("Setting TraceClassUnLoading flag failed with error %s", Flag::flag_error_str(error))); } GrowableArray* LoadedClassesEnumerator::_loaded_classes = NULL;