comparison agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java @ 23286:dd9cc155639c

Merge with jdk8u66-b17
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Thu, 07 Jan 2016 17:28:46 +0100
parents 89152779163c 89783a257836
children
comparison
equal deleted inserted replaced
22786:ac649db7fec4 23286:dd9cc155639c
1 /* 1 /*
2 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2004, 2015, 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.
797 out.writeInt(DUMMY_STACK_TRACE_ID); 797 out.writeInt(DUMMY_STACK_TRACE_ID);
798 Klass klass = instance.getKlass(); 798 Klass klass = instance.getKlass();
799 writeObjectID(klass.getJavaMirror()); 799 writeObjectID(klass.getJavaMirror());
800 800
801 ClassData cd = (ClassData) classDataCache.get(klass); 801 ClassData cd = (ClassData) classDataCache.get(klass);
802 if (cd == null) {
803 // The class is not present in the system dictionary, probably Lambda.
804 // Add it to cache here
805 if (klass instanceof InstanceKlass) {
806 InstanceKlass ik = (InstanceKlass) klass;
807 List fields = getInstanceFields(ik);
808 int instSize = getSizeForFields(fields);
809 cd = new ClassData(instSize, fields);
810 classDataCache.put(ik, cd);
811 }
812 }
813
802 if (Assert.ASSERTS_ENABLED) { 814 if (Assert.ASSERTS_ENABLED) {
803 Assert.that(cd != null, "can not get class data for " + klass.getName().asString() + klass.getAddress()); 815 Assert.that(cd != null, "can not get class data for " + klass.getName().asString() + klass.getAddress());
804 } 816 }
805 List fields = cd.fields; 817 List fields = cd.fields;
806 int size = cd.instSize; 818 int size = cd.instSize;