< prev index next >
src/share/vm/memory/binaryTreeDictionary.cpp
Print this page
@@ -23,10 +23,11 @@
*/
#include "precompiled.hpp"
#include "gc/cms/allocationStats.hpp"
#include "gc/shared/spaceDecorator.hpp"
+#include "logging/logStream.inline.hpp"
#include "memory/binaryTreeDictionary.hpp"
#include "memory/freeBlockDictionary.hpp"
#include "memory/freeList.hpp"
#include "memory/metachunk.hpp"
#include "memory/resourceArea.hpp"
@@ -1188,14 +1189,14 @@
template <class Chunk_t, class FreeList_t>
void BinaryTreeDictionary<Chunk_t, FreeList_t>::end_sweep_dict_census(double splitSurplusPercent) {
// Does walking the tree 3 times hurt?
set_tree_surplus(splitSurplusPercent);
set_tree_hints();
- Log(gc, freelist, stats) log;
- if (log.is_trace()) {
- ResourceMark rm;
- report_statistics(log.trace_stream());
+ LogTarget(Trace, gc, freelist, stats) out;
+ if (out.is_enabled()) {
+ LogStream stream(out);
+ report_statistics(&stream);
}
clear_tree_census();
}
// Print summary statistics
@@ -1230,31 +1231,30 @@
_total_free = 0;
}
FreeList_t* total() { return &_total; }
size_t total_free() { return _total_free; }
void do_list(FreeList<Chunk_t>* fl) {
- Log(gc, freelist, census) log;
- outputStream* out = log.debug_stream();
+ LogStreamHandle(Debug, gc, freelist, census) out;
+
if (++_print_line >= 40) {
- ResourceMark rm;
- FreeList_t::print_labels_on(out, "size");
+ FreeList_t::print_labels_on(&out, "size");
_print_line = 0;
}
- fl->print_on(out);
+ fl->print_on(&out);
_total_free += fl->count() * fl->size();
total()->set_count(total()->count() + fl->count());
}
#if INCLUDE_ALL_GCS
void do_list(AdaptiveFreeList<Chunk_t>* fl) {
- Log(gc, freelist, census) log;
- outputStream* out = log.debug_stream();
+ LogStreamHandle(Debug, gc, freelist, census) out;
+
if (++_print_line >= 40) {
- FreeList_t::print_labels_on(out, "size");
+ FreeList_t::print_labels_on(&out, "size");
_print_line = 0;
}
- fl->print_on(out);
+ fl->print_on(&out);
_total_free += fl->count() * fl->size() ;
total()->set_count( total()->count() + fl->count() );
total()->set_bfr_surp( total()->bfr_surp() + fl->bfr_surp() );
total()->set_surplus( total()->split_deaths() + fl->surplus() );
total()->set_desired( total()->desired() + fl->desired() );
< prev index next >