src/hotspot/share/runtime/memprofiler.cpp
changeset 48873 9536c39ac6de
parent 48105 8d15b1369c7a
child 48874 f09fdaad7321
equal deleted inserted replaced
48872:c7774afc93e3 48873:9536c39ac6de
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
       
    26 #include "classfile/classLoaderData.inline.hpp"
    26 #include "classfile/systemDictionary.hpp"
    27 #include "classfile/systemDictionary.hpp"
    27 #include "code/codeCache.hpp"
    28 #include "code/codeCache.hpp"
    28 #include "gc/shared/collectedHeap.inline.hpp"
    29 #include "gc/shared/collectedHeap.inline.hpp"
    29 #include "gc/shared/generation.hpp"
    30 #include "gc/shared/generation.hpp"
    30 #include "interpreter/oopMapCache.hpp"
    31 #include "interpreter/oopMapCache.hpp"
   114       handles_memory_usage  += cur->handle_area()->size_in_bytes();
   115       handles_memory_usage  += cur->handle_area()->size_in_bytes();
   115       resource_memory_usage += cur->resource_area()->size_in_bytes();
   116       resource_memory_usage += cur->resource_area()->size_in_bytes();
   116     }
   117     }
   117 
   118 
   118     // Print trace line in log
   119     // Print trace line in log
   119     fprintf(_log_fp, "%6.1f,%5d,%5d," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",",
   120     fprintf(_log_fp, "%6.1f,%5d," SIZE_FORMAT_W(5) "," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",",
   120             os::elapsedTime(),
   121             os::elapsedTime(),
   121             jtiwh.length(),
   122             jtiwh.length(),
   122             InstanceKlass::number_of_instance_classes(),
   123             ClassLoaderDataGraph::num_instance_classes(),
   123             Universe::heap()->used() / K,
   124             Universe::heap()->used() / K,
   124             Universe::heap()->capacity() / K);
   125             Universe::heap()->capacity() / K);
   125   }
   126   }
   126 
   127 
   127   fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K);
   128   fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K);