11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderData.hpp"
27 #include "gc_interface/collectedHeap.hpp"
28 #include "memory/genCollectedHeap.hpp"
29 #include "memory/heapInspection.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "runtime/os.hpp"
32 #include "utilities/globalDefinitions.hpp"
33 #include "utilities/macros.hpp"
34 #if INCLUDE_ALL_GCS
35 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
36 #endif // INCLUDE_ALL_GCS
37
38 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
39
40 // HeapInspection
41
42 int KlassInfoEntry::compare(KlassInfoEntry* e1, KlassInfoEntry* e2) {
43 if(e1->_instance_words > e2->_instance_words) {
44 return -1;
45 } else if(e1->_instance_words < e2->_instance_words) {
46 return 1;
47 }
48 // Sort alphabetically, note 'Z' < '[' < 'a', but it's better to group
49 // the array classes before all the instance classes.
50 ResourceMark rm;
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderData.hpp"
27 #include "gc_interface/collectedHeap.hpp"
28 #include "memory/genCollectedHeap.hpp"
29 #include "memory/heapInspection.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "oops/oop.inline.hpp"
32 #include "runtime/os.hpp"
33 #include "utilities/globalDefinitions.hpp"
34 #include "utilities/macros.hpp"
35 #if INCLUDE_ALL_GCS
36 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
37 #endif // INCLUDE_ALL_GCS
38
39 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
40
41 // HeapInspection
42
43 int KlassInfoEntry::compare(KlassInfoEntry* e1, KlassInfoEntry* e2) {
44 if(e1->_instance_words > e2->_instance_words) {
45 return -1;
46 } else if(e1->_instance_words < e2->_instance_words) {
47 return 1;
48 }
49 // Sort alphabetically, note 'Z' < '[' < 'a', but it's better to group
50 // the array classes before all the instance classes.
51 ResourceMark rm;
|