diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/MetricMonitorValues.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/MetricMonitorValues.java index bc4d9fff46a9d..ffe75ea4f34b9 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/MetricMonitorValues.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/MetricMonitorValues.java @@ -70,27 +70,34 @@ public final class MetricMonitorValues { public static final String JVM_MEMORY_TOTAL_USED = JVM_MEMORY + ".total.used"; public static final String JVM_MEMORY_TOTAL_COMMITTED = JVM_MEMORY + ".total.committed"; public static final String JVM_MEMORY_TOTAL_MAX = JVM_MEMORY + ".total.max"; - // Serial collector + // Serial collector ( -XX:+UseSerialGC ) + public static final String JVM_MEMORY_POOLS_CODE_CACHE = JVM_MEMORY + ".pools.Code-Cache.usage"; public static final String JVM_MEMORY_POOLS_EDEN = JVM_MEMORY + ".pools.Eden-Space.usage"; - public static final String JVM_MEMORY_POOLS_PERMGEN = JVM_MEMORY + ".pools.Perm-Gen.usage"; + public static final String JVM_MEMORY_POOLS_OLDGEN = JVM_MEMORY + ".pools.Tenured-Gen.usage"; public static final String JVM_MEMORY_POOLS_SURVIVOR = JVM_MEMORY + ".pools.Survivor-Space.usage"; - public static final String JVM_MEMORY_POOLS_TENURED = JVM_MEMORY + ".pools.Tenured-Gen.usage"; - // Parallel (Old) collector + public static final String JVM_MEMORY_POOLS_PERMGEN = JVM_MEMORY + ".pools.Perm-Gen.usage"; + public static final String JVM_MEMORY_POOLS_METASPACE = JVM_MEMORY + ".pools.Metaspace.usage"; + // Parallel (Old) collector ( -XX:+UseParallelOldGC ) + public static final String JVM_MEMORY_POOLS_PS_CODE_CACHE = JVM_MEMORY + ".pools.Code-Cache.usage"; public static final String JVM_MEMORY_POOLS_PS_EDEN = JVM_MEMORY + ".pools.PS-Eden-Space.usage"; public static final String JVM_MEMORY_POOLS_PS_OLDGEN = JVM_MEMORY + ".pools.PS-Old-Gen.usage"; - public static final String JVM_MEMORY_POOLS_PS_PERMGEN = JVM_MEMORY + ".pools.PS-Perm-Gen.usage"; public static final String JVM_MEMORY_POOLS_PS_SURVIVOR = JVM_MEMORY + ".pools.PS-Survivor-Space.usage"; - // CMS collector + public static final String JVM_MEMORY_POOLS_PS_PERMGEN = JVM_MEMORY + ".pools.PS-Perm-Gen.usage"; + public static final String JVM_MEMORY_POOLS_PS_METASPACE = JVM_MEMORY + ".pools.Metaspace.usage"; + // CMS collector ( -XX:+UseConcMarkSweepGC ) + public static final String JVM_MEMORY_POOLS_CMS_CODE_CACHE = JVM_MEMORY + ".pools.Code-Cache.usage"; + public static final String JVM_MEMORY_POOLS_CMS_EDEN = JVM_MEMORY + ".pools.Par-Eden-Space.usage"; public static final String JVM_MEMORY_POOLS_CMS_OLDGEN = JVM_MEMORY + ".pools.CMS-Old-Gen.usage"; + public static final String JVM_MEMORY_POOLS_CMS_SURVIVOR = JVM_MEMORY + ".pools.Par-Survivor-Space.usage"; public static final String JVM_MEMORY_POOLS_CMS_PERMGEN = JVM_MEMORY + ".pools.CMS-Perm-Gen.usage"; - public static final String JVM_MEMORY_POOLS_CODECACHE = JVM_MEMORY + ".pools.Code-Cache.usage"; - public static final String JVM_MEMORY_POOLS_PAREDEN = JVM_MEMORY + ".pools.Par-Eden-Space.usage"; - public static final String JVM_MEMORY_POOLS_PARSURVIVOR = JVM_MEMORY + ".pools.Par-Survivor-Space.usage"; - // G1 collector + public static final String JVM_MEMORY_POOLS_CMS_METASPACE = JVM_MEMORY + ".pools.Metaspace.usage"; + // G1 collector ( -XX:+UseG1GC ) + public static final String JVM_MEMORY_POOLS_G1_CODE_CACHE = JVM_MEMORY + ".pools.Code-Cache.usage"; public static final String JVM_MEMORY_POOLS_G1_EDEN = JVM_MEMORY + ".pools.G1-Eden-Space.usage"; public static final String JVM_MEMORY_POOLS_G1_OLDGEN = JVM_MEMORY + ".pools.G1-Old-Gen.usage"; - public static final String JVM_MEMORY_POOLS_G1_PERMGEN = JVM_MEMORY + ".pools.G1-Perm-Gen.usage"; public static final String JVM_MEMORY_POOLS_G1_SURVIVOR = JVM_MEMORY + ".pools.G1-Survivor-Space.usage"; + public static final String JVM_MEMORY_POOLS_G1_PERMGEN = JVM_MEMORY + ".pools.G1-Perm-Gen.usage"; + public static final String JVM_MEMORY_POOLS_G1_METASPACE = JVM_MEMORY + ".pools.Metaspace.usage"; public static final String CPU_LOAD = "cpu.load"; // CPU Load (JVM) diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/CmsCollector.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/CmsCollector.java index 5619a567e8005..b37e4ed8f09f6 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/CmsCollector.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/CmsCollector.java @@ -31,10 +31,10 @@ * * @author emeroad * @author harebox + * @author dawidmalina */ public class CmsCollector implements GarbageCollector { - public static final TJvmGcType GC_TYPE = TJvmGcType.CMS; private final Gauge heapMax; @@ -43,6 +43,13 @@ public class CmsCollector implements GarbageCollector { private final Gauge heapNonHeapMax; private final Gauge heapNonHeapUsed; + private final Gauge codeCacheUsage; + private final Gauge edenSpaceUsage; + private final Gauge oldGenUsage; + private final Gauge survivorSpaceUsage; + private final Gauge permGenUsage; + private final Gauge metaspaceUsage; + private final Gauge gcCount; private final Gauge gcTime; @@ -52,6 +59,7 @@ public CmsCollector(MetricMonitorRegistry registry) { } final MetricRegistry metricRegistry = registry.getRegistry(); + @SuppressWarnings("rawtypes") final SortedMap gauges = metricRegistry.getGauges(); this.heapMax = getLongGauge(gauges, JVM_MEMORY_HEAP_MAX); @@ -60,20 +68,26 @@ public CmsCollector(MetricMonitorRegistry registry) { this.heapNonHeapMax = getLongGauge(gauges, JVM_MEMORY_NONHEAP_MAX); this.heapNonHeapUsed = getLongGauge(gauges, JVM_MEMORY_NONHEAP_USED); + this.codeCacheUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CMS_CODE_CACHE); + this.edenSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CMS_EDEN); + this.oldGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CMS_OLDGEN); + this.survivorSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CMS_SURVIVOR); + this.permGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CMS_PERMGEN); + this.metaspaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CMS_METASPACE); + this.gcCount = getLongGauge(gauges, JVM_GC_CMS_COUNT); this.gcTime = getLongGauge(gauges, JVM_GC_CMS_TIME); - } @Override public int getTypeCode() { - return GC_TYPE.getValue(); + return GC_TYPE.ordinal(); } @Override public TJvmGc collect() { - TJvmGc gc = new TJvmGc(); + final TJvmGc gc = new TJvmGc(); gc.setType(GC_TYPE); gc.setJvmMemoryHeapMax(heapMax.getValue()); gc.setJvmMemoryHeapUsed(heapUsed.getValue()); @@ -81,9 +95,15 @@ public TJvmGc collect() { gc.setJvmMemoryNonHeapMax(heapNonHeapMax.getValue()); gc.setJvmMemoryNonHeapUsed(heapNonHeapUsed.getValue()); + gc.setJvmPoolCodeCacheUsage(codeCacheUsage.getValue()); + gc.setJvmPoolEdenSpaceUsage(edenSpaceUsage.getValue()); + gc.setJvmPoolOldGenUsage(oldGenUsage.getValue()); + gc.setJvmPoolSurvivorSpaceUsage(survivorSpaceUsage.getValue()); + gc.setJvmPoolPermGenUsage(permGenUsage.getValue()); // can be null for jvm >= 1.8 + gc.setJvmPoolMetaspaceUsage(metaspaceUsage.getValue()); // can be null for jvm < 1.8 + gc.setJvmGcOldCount(gcCount.getValue()); gc.setJvmGcOldTime(gcTime.getValue()); - return gc; } diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/G1Collector.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/G1Collector.java index ab134ca93aa9e..b530e58249372 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/G1Collector.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/G1Collector.java @@ -31,6 +31,7 @@ * * @author emeroad * @author harebox + * @author dawidmalina */ public class G1Collector implements GarbageCollector { @@ -42,15 +43,23 @@ public class G1Collector implements GarbageCollector { private final Gauge heapNonHeapMax; private final Gauge heapNonHeapUsed; + private final Gauge codeCacheUsage; + private final Gauge edenSpaceUsage; + private final Gauge oldGenUsage; + private final Gauge survivorSpaceUsage; + private final Gauge permGenUsage; + private final Gauge metaspaceUsage; + private final Gauge gcCount; private final Gauge gcTime; - public G1Collector(MetricMonitorRegistry registry) { if (registry == null) { throw new NullPointerException("registry must not be null"); } + final MetricRegistry metricRegistry = registry.getRegistry(); + @SuppressWarnings("rawtypes") final SortedMap gauges = metricRegistry.getGauges(); this.heapMax = getLongGauge(gauges, JVM_MEMORY_HEAP_MAX); @@ -59,6 +68,13 @@ public G1Collector(MetricMonitorRegistry registry) { this.heapNonHeapMax = getLongGauge(gauges, JVM_MEMORY_NONHEAP_MAX); this.heapNonHeapUsed = getLongGauge(gauges, JVM_MEMORY_NONHEAP_USED); + this.codeCacheUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_G1_CODE_CACHE); + this.edenSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_G1_EDEN); + this.oldGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_G1_OLDGEN); + this.survivorSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_G1_SURVIVOR); + this.permGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_G1_PERMGEN); + this.metaspaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_G1_METASPACE); + this.gcCount = getLongGauge(gauges, JVM_GC_G1_OLD_COUNT); this.gcTime = getLongGauge(gauges, JVM_GC_G1_OLD_TIME); } @@ -79,6 +95,13 @@ public TJvmGc collect() { gc.setJvmMemoryNonHeapMax(heapNonHeapMax.getValue()); gc.setJvmMemoryNonHeapUsed(heapNonHeapUsed.getValue()); + gc.setJvmPoolCodeCacheUsage(codeCacheUsage.getValue()); + gc.setJvmPoolEdenSpaceUsage(edenSpaceUsage.getValue()); + gc.setJvmPoolOldGenUsage(oldGenUsage.getValue()); + gc.setJvmPoolSurvivorSpaceUsage(survivorSpaceUsage.getValue()); + gc.setJvmPoolPermGenUsage(permGenUsage.getValue()); // can be null for jvm >= 1.8 + gc.setJvmPoolMetaspaceUsage(metaspaceUsage.getValue()); // can be null for jvm < 1.8 + gc.setJvmGcOldCount(gcCount.getValue()); gc.setJvmGcOldTime(gcTime.getValue()); return gc; diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/ParallelCollector.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/ParallelCollector.java index d7514147cf951..80ebd7ac35918 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/ParallelCollector.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/ParallelCollector.java @@ -31,6 +31,7 @@ * * @author emeroad * @author harebox + * @author dawidmalina */ public class ParallelCollector implements GarbageCollector { @@ -42,6 +43,13 @@ public class ParallelCollector implements GarbageCollector { private final Gauge heapNonHeapMax; private final Gauge heapNonHeapUsed; + private final Gauge codeCacheUsage; + private final Gauge edenSpaceUsage; + private final Gauge oldGenUsage; + private final Gauge survivorSpaceUsage; + private final Gauge permGenUsage; + private final Gauge metaspaceUsage; + private final Gauge gcCount; private final Gauge gcTime; @@ -49,7 +57,9 @@ public ParallelCollector(MetricMonitorRegistry registry) { if (registry == null) { throw new NullPointerException("registry must not be null"); } + final MetricRegistry metricRegistry = registry.getRegistry(); + @SuppressWarnings("rawtypes") final SortedMap gauges = metricRegistry.getGauges(); this.heapMax = getLongGauge(gauges, JVM_MEMORY_HEAP_MAX); @@ -58,6 +68,13 @@ public ParallelCollector(MetricMonitorRegistry registry) { this.heapNonHeapMax = getLongGauge(gauges, JVM_MEMORY_NONHEAP_MAX); this.heapNonHeapUsed = getLongGauge(gauges, JVM_MEMORY_NONHEAP_USED); + this.codeCacheUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PS_CODE_CACHE); + this.edenSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PS_EDEN); + this.oldGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PS_OLDGEN); + this.survivorSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PS_SURVIVOR); + this.permGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PS_PERMGEN); + this.metaspaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PS_METASPACE); + this.gcCount = getLongGauge(gauges, JVM_GC_PS_MS_COUNT); this.gcTime = getLongGauge(gauges, JVM_GC_PS_MS_TIME); } @@ -78,6 +95,13 @@ public TJvmGc collect() { gc.setJvmMemoryNonHeapMax(heapNonHeapMax.getValue()); gc.setJvmMemoryNonHeapUsed(heapNonHeapUsed.getValue()); + gc.setJvmPoolCodeCacheUsage(codeCacheUsage.getValue()); + gc.setJvmPoolEdenSpaceUsage(edenSpaceUsage.getValue()); + gc.setJvmPoolOldGenUsage(oldGenUsage.getValue()); + gc.setJvmPoolSurvivorSpaceUsage(survivorSpaceUsage.getValue()); + gc.setJvmPoolPermGenUsage(permGenUsage.getValue()); // can be null for jvm >= 1.8 + gc.setJvmPoolMetaspaceUsage(metaspaceUsage.getValue()); // can be null for jvm < 1.8 + gc.setJvmGcOldCount(gcCount.getValue()); gc.setJvmGcOldTime(gcTime.getValue()); return gc; diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/SerialCollector.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/SerialCollector.java index c6296daccf927..34cdbb21f751a 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/SerialCollector.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/monitor/codahale/gc/SerialCollector.java @@ -31,6 +31,7 @@ * * @author emeroad * @author harebox + * @author dawidmalina */ public class SerialCollector implements GarbageCollector { @@ -42,6 +43,13 @@ public class SerialCollector implements GarbageCollector { private final Gauge heapNonHeapMax; private final Gauge heapNonHeapUsed; + private final Gauge codeCacheUsage; + private final Gauge edenSpaceUsage; + private final Gauge oldGenUsage; + private final Gauge survivorSpaceUsage; + private final Gauge permGenUsage; + private final Gauge metaspaceUsage; + private final Gauge gcCount; private final Gauge gcTime; @@ -51,6 +59,7 @@ public SerialCollector(MetricMonitorRegistry registry) { } final MetricRegistry metricRegistry = registry.getRegistry(); + @SuppressWarnings("rawtypes") final SortedMap gauges = metricRegistry.getGauges(); this.heapMax = getLongGauge(gauges, JVM_MEMORY_HEAP_MAX); @@ -59,6 +68,13 @@ public SerialCollector(MetricMonitorRegistry registry) { this.heapNonHeapMax = getLongGauge(gauges, JVM_MEMORY_NONHEAP_MAX); this.heapNonHeapUsed = getLongGauge(gauges, JVM_MEMORY_NONHEAP_USED); + this.codeCacheUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_CODE_CACHE); + this.edenSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_EDEN); + this.oldGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_OLDGEN); + this.survivorSpaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_SURVIVOR); + this.permGenUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_PERMGEN); + this.metaspaceUsage = getLongGauge(gauges, JVM_MEMORY_POOLS_METASPACE); + this.gcCount = getLongGauge(gauges, JVM_GC_SERIAL_MSC_COUNT); this.gcTime = getLongGauge(gauges, JVM_GC_SERIAL_MSC_TIME); } @@ -79,6 +95,13 @@ public TJvmGc collect() { gc.setJvmMemoryNonHeapMax(heapNonHeapMax.getValue()); gc.setJvmMemoryNonHeapUsed(heapNonHeapUsed.getValue()); + gc.setJvmPoolCodeCacheUsage(codeCacheUsage.getValue()); + gc.setJvmPoolEdenSpaceUsage(edenSpaceUsage.getValue()); + gc.setJvmPoolOldGenUsage(oldGenUsage.getValue()); + gc.setJvmPoolSurvivorSpaceUsage(survivorSpaceUsage.getValue()); + gc.setJvmPoolPermGenUsage(permGenUsage.getValue()); // can be null for jvm >= 1.8 + gc.setJvmPoolMetaspaceUsage(metaspaceUsage.getValue()); // can be null for jvm < 1.8 + gc.setJvmGcOldCount(gcCount.getValue()); gc.setJvmGcOldTime(gcTime.getValue()); return gc; diff --git a/thrift/src/compiler/linux/thrift-0.9.2 b/thrift/src/compiler/linux/thrift-0.9.2 new file mode 100755 index 0000000000000..8284ed1c53e87 Binary files /dev/null and b/thrift/src/compiler/linux/thrift-0.9.2 differ diff --git a/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TJvmGc.java b/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TJvmGc.java index c039f097f8ef1..cc90d966f57fb 100644 --- a/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TJvmGc.java +++ b/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TJvmGc.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-19") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-2") public class TJvmGc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TJvmGc"); @@ -45,6 +45,12 @@ public class TJvmGc implements org.apache.thrift.TBase, private static final org.apache.thrift.protocol.TField JVM_MEMORY_NON_HEAP_MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmMemoryNonHeapMax", org.apache.thrift.protocol.TType.I64, (short)5); private static final org.apache.thrift.protocol.TField JVM_GC_OLD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmGcOldCount", org.apache.thrift.protocol.TType.I64, (short)6); private static final org.apache.thrift.protocol.TField JVM_GC_OLD_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmGcOldTime", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField JVM_POOL_CODE_CACHE_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmPoolCodeCacheUsage", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField JVM_POOL_EDEN_SPACE_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmPoolEdenSpaceUsage", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField JVM_POOL_OLD_GEN_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmPoolOldGenUsage", org.apache.thrift.protocol.TType.I64, (short)10); + private static final org.apache.thrift.protocol.TField JVM_POOL_SURVIVOR_SPACE_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmPoolSurvivorSpaceUsage", org.apache.thrift.protocol.TType.I64, (short)11); + private static final org.apache.thrift.protocol.TField JVM_POOL_PERM_GEN_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmPoolPermGenUsage", org.apache.thrift.protocol.TType.I64, (short)12); + private static final org.apache.thrift.protocol.TField JVM_POOL_METASPACE_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("jvmPoolMetaspaceUsage", org.apache.thrift.protocol.TType.I64, (short)13); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -59,6 +65,12 @@ public class TJvmGc implements org.apache.thrift.TBase, private long jvmMemoryNonHeapMax; // required private long jvmGcOldCount; // required private long jvmGcOldTime; // required + private long jvmPoolCodeCacheUsage; // required + private long jvmPoolEdenSpaceUsage; // required + private long jvmPoolOldGenUsage; // required + private long jvmPoolSurvivorSpaceUsage; // required + private long jvmPoolPermGenUsage; // optional + private long jvmPoolMetaspaceUsage; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -72,7 +84,13 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { JVM_MEMORY_NON_HEAP_USED((short)4, "jvmMemoryNonHeapUsed"), JVM_MEMORY_NON_HEAP_MAX((short)5, "jvmMemoryNonHeapMax"), JVM_GC_OLD_COUNT((short)6, "jvmGcOldCount"), - JVM_GC_OLD_TIME((short)7, "jvmGcOldTime"); + JVM_GC_OLD_TIME((short)7, "jvmGcOldTime"), + JVM_POOL_CODE_CACHE_USAGE((short)8, "jvmPoolCodeCacheUsage"), + JVM_POOL_EDEN_SPACE_USAGE((short)9, "jvmPoolEdenSpaceUsage"), + JVM_POOL_OLD_GEN_USAGE((short)10, "jvmPoolOldGenUsage"), + JVM_POOL_SURVIVOR_SPACE_USAGE((short)11, "jvmPoolSurvivorSpaceUsage"), + JVM_POOL_PERM_GEN_USAGE((short)12, "jvmPoolPermGenUsage"), + JVM_POOL_METASPACE_USAGE((short)13, "jvmPoolMetaspaceUsage"); private static final Map byName = new HashMap(); @@ -101,6 +119,18 @@ public static _Fields findByThriftId(int fieldId) { return JVM_GC_OLD_COUNT; case 7: // JVM_GC_OLD_TIME return JVM_GC_OLD_TIME; + case 8: // JVM_POOL_CODE_CACHE_USAGE + return JVM_POOL_CODE_CACHE_USAGE; + case 9: // JVM_POOL_EDEN_SPACE_USAGE + return JVM_POOL_EDEN_SPACE_USAGE; + case 10: // JVM_POOL_OLD_GEN_USAGE + return JVM_POOL_OLD_GEN_USAGE; + case 11: // JVM_POOL_SURVIVOR_SPACE_USAGE + return JVM_POOL_SURVIVOR_SPACE_USAGE; + case 12: // JVM_POOL_PERM_GEN_USAGE + return JVM_POOL_PERM_GEN_USAGE; + case 13: // JVM_POOL_METASPACE_USAGE + return JVM_POOL_METASPACE_USAGE; default: return null; } @@ -147,7 +177,14 @@ public String getFieldName() { private static final int __JVMMEMORYNONHEAPMAX_ISSET_ID = 3; private static final int __JVMGCOLDCOUNT_ISSET_ID = 4; private static final int __JVMGCOLDTIME_ISSET_ID = 5; - private byte __isset_bitfield = 0; + private static final int __JVMPOOLCODECACHEUSAGE_ISSET_ID = 6; + private static final int __JVMPOOLEDENSPACEUSAGE_ISSET_ID = 7; + private static final int __JVMPOOLOLDGENUSAGE_ISSET_ID = 8; + private static final int __JVMPOOLSURVIVORSPACEUSAGE_ISSET_ID = 9; + private static final int __JVMPOOLPERMGENUSAGE_ISSET_ID = 10; + private static final int __JVMPOOLMETASPACEUSAGE_ISSET_ID = 11; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.JVM_POOL_PERM_GEN_USAGE,_Fields.JVM_POOL_METASPACE_USAGE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -165,6 +202,18 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.JVM_GC_OLD_TIME, new org.apache.thrift.meta_data.FieldMetaData("jvmGcOldTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.JVM_POOL_CODE_CACHE_USAGE, new org.apache.thrift.meta_data.FieldMetaData("jvmPoolCodeCacheUsage", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.JVM_POOL_EDEN_SPACE_USAGE, new org.apache.thrift.meta_data.FieldMetaData("jvmPoolEdenSpaceUsage", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.JVM_POOL_OLD_GEN_USAGE, new org.apache.thrift.meta_data.FieldMetaData("jvmPoolOldGenUsage", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.JVM_POOL_SURVIVOR_SPACE_USAGE, new org.apache.thrift.meta_data.FieldMetaData("jvmPoolSurvivorSpaceUsage", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.JVM_POOL_PERM_GEN_USAGE, new org.apache.thrift.meta_data.FieldMetaData("jvmPoolPermGenUsage", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.JVM_POOL_METASPACE_USAGE, new org.apache.thrift.meta_data.FieldMetaData("jvmPoolMetaspaceUsage", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TJvmGc.class, metaDataMap); } @@ -181,7 +230,11 @@ public TJvmGc( long jvmMemoryNonHeapUsed, long jvmMemoryNonHeapMax, long jvmGcOldCount, - long jvmGcOldTime) + long jvmGcOldTime, + long jvmPoolCodeCacheUsage, + long jvmPoolEdenSpaceUsage, + long jvmPoolOldGenUsage, + long jvmPoolSurvivorSpaceUsage) { this(); this.type = type; @@ -197,6 +250,14 @@ public TJvmGc( setJvmGcOldCountIsSet(true); this.jvmGcOldTime = jvmGcOldTime; setJvmGcOldTimeIsSet(true); + this.jvmPoolCodeCacheUsage = jvmPoolCodeCacheUsage; + setJvmPoolCodeCacheUsageIsSet(true); + this.jvmPoolEdenSpaceUsage = jvmPoolEdenSpaceUsage; + setJvmPoolEdenSpaceUsageIsSet(true); + this.jvmPoolOldGenUsage = jvmPoolOldGenUsage; + setJvmPoolOldGenUsageIsSet(true); + this.jvmPoolSurvivorSpaceUsage = jvmPoolSurvivorSpaceUsage; + setJvmPoolSurvivorSpaceUsageIsSet(true); } /** @@ -213,6 +274,12 @@ public TJvmGc(TJvmGc other) { this.jvmMemoryNonHeapMax = other.jvmMemoryNonHeapMax; this.jvmGcOldCount = other.jvmGcOldCount; this.jvmGcOldTime = other.jvmGcOldTime; + this.jvmPoolCodeCacheUsage = other.jvmPoolCodeCacheUsage; + this.jvmPoolEdenSpaceUsage = other.jvmPoolEdenSpaceUsage; + this.jvmPoolOldGenUsage = other.jvmPoolOldGenUsage; + this.jvmPoolSurvivorSpaceUsage = other.jvmPoolSurvivorSpaceUsage; + this.jvmPoolPermGenUsage = other.jvmPoolPermGenUsage; + this.jvmPoolMetaspaceUsage = other.jvmPoolMetaspaceUsage; } public TJvmGc deepCopy() { @@ -235,6 +302,18 @@ public void clear() { this.jvmGcOldCount = 0; setJvmGcOldTimeIsSet(false); this.jvmGcOldTime = 0; + setJvmPoolCodeCacheUsageIsSet(false); + this.jvmPoolCodeCacheUsage = 0; + setJvmPoolEdenSpaceUsageIsSet(false); + this.jvmPoolEdenSpaceUsage = 0; + setJvmPoolOldGenUsageIsSet(false); + this.jvmPoolOldGenUsage = 0; + setJvmPoolSurvivorSpaceUsageIsSet(false); + this.jvmPoolSurvivorSpaceUsage = 0; + setJvmPoolPermGenUsageIsSet(false); + this.jvmPoolPermGenUsage = 0; + setJvmPoolMetaspaceUsageIsSet(false); + this.jvmPoolMetaspaceUsage = 0; } /** @@ -400,6 +479,138 @@ public void setJvmGcOldTimeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMGCOLDTIME_ISSET_ID, value); } + public long getJvmPoolCodeCacheUsage() { + return this.jvmPoolCodeCacheUsage; + } + + public void setJvmPoolCodeCacheUsage(long jvmPoolCodeCacheUsage) { + this.jvmPoolCodeCacheUsage = jvmPoolCodeCacheUsage; + setJvmPoolCodeCacheUsageIsSet(true); + } + + public void unsetJvmPoolCodeCacheUsage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JVMPOOLCODECACHEUSAGE_ISSET_ID); + } + + /** Returns true if field jvmPoolCodeCacheUsage is set (has been assigned a value) and false otherwise */ + public boolean isSetJvmPoolCodeCacheUsage() { + return EncodingUtils.testBit(__isset_bitfield, __JVMPOOLCODECACHEUSAGE_ISSET_ID); + } + + public void setJvmPoolCodeCacheUsageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMPOOLCODECACHEUSAGE_ISSET_ID, value); + } + + public long getJvmPoolEdenSpaceUsage() { + return this.jvmPoolEdenSpaceUsage; + } + + public void setJvmPoolEdenSpaceUsage(long jvmPoolEdenSpaceUsage) { + this.jvmPoolEdenSpaceUsage = jvmPoolEdenSpaceUsage; + setJvmPoolEdenSpaceUsageIsSet(true); + } + + public void unsetJvmPoolEdenSpaceUsage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JVMPOOLEDENSPACEUSAGE_ISSET_ID); + } + + /** Returns true if field jvmPoolEdenSpaceUsage is set (has been assigned a value) and false otherwise */ + public boolean isSetJvmPoolEdenSpaceUsage() { + return EncodingUtils.testBit(__isset_bitfield, __JVMPOOLEDENSPACEUSAGE_ISSET_ID); + } + + public void setJvmPoolEdenSpaceUsageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMPOOLEDENSPACEUSAGE_ISSET_ID, value); + } + + public long getJvmPoolOldGenUsage() { + return this.jvmPoolOldGenUsage; + } + + public void setJvmPoolOldGenUsage(long jvmPoolOldGenUsage) { + this.jvmPoolOldGenUsage = jvmPoolOldGenUsage; + setJvmPoolOldGenUsageIsSet(true); + } + + public void unsetJvmPoolOldGenUsage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JVMPOOLOLDGENUSAGE_ISSET_ID); + } + + /** Returns true if field jvmPoolOldGenUsage is set (has been assigned a value) and false otherwise */ + public boolean isSetJvmPoolOldGenUsage() { + return EncodingUtils.testBit(__isset_bitfield, __JVMPOOLOLDGENUSAGE_ISSET_ID); + } + + public void setJvmPoolOldGenUsageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMPOOLOLDGENUSAGE_ISSET_ID, value); + } + + public long getJvmPoolSurvivorSpaceUsage() { + return this.jvmPoolSurvivorSpaceUsage; + } + + public void setJvmPoolSurvivorSpaceUsage(long jvmPoolSurvivorSpaceUsage) { + this.jvmPoolSurvivorSpaceUsage = jvmPoolSurvivorSpaceUsage; + setJvmPoolSurvivorSpaceUsageIsSet(true); + } + + public void unsetJvmPoolSurvivorSpaceUsage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JVMPOOLSURVIVORSPACEUSAGE_ISSET_ID); + } + + /** Returns true if field jvmPoolSurvivorSpaceUsage is set (has been assigned a value) and false otherwise */ + public boolean isSetJvmPoolSurvivorSpaceUsage() { + return EncodingUtils.testBit(__isset_bitfield, __JVMPOOLSURVIVORSPACEUSAGE_ISSET_ID); + } + + public void setJvmPoolSurvivorSpaceUsageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMPOOLSURVIVORSPACEUSAGE_ISSET_ID, value); + } + + public long getJvmPoolPermGenUsage() { + return this.jvmPoolPermGenUsage; + } + + public void setJvmPoolPermGenUsage(long jvmPoolPermGenUsage) { + this.jvmPoolPermGenUsage = jvmPoolPermGenUsage; + setJvmPoolPermGenUsageIsSet(true); + } + + public void unsetJvmPoolPermGenUsage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JVMPOOLPERMGENUSAGE_ISSET_ID); + } + + /** Returns true if field jvmPoolPermGenUsage is set (has been assigned a value) and false otherwise */ + public boolean isSetJvmPoolPermGenUsage() { + return EncodingUtils.testBit(__isset_bitfield, __JVMPOOLPERMGENUSAGE_ISSET_ID); + } + + public void setJvmPoolPermGenUsageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMPOOLPERMGENUSAGE_ISSET_ID, value); + } + + public long getJvmPoolMetaspaceUsage() { + return this.jvmPoolMetaspaceUsage; + } + + public void setJvmPoolMetaspaceUsage(long jvmPoolMetaspaceUsage) { + this.jvmPoolMetaspaceUsage = jvmPoolMetaspaceUsage; + setJvmPoolMetaspaceUsageIsSet(true); + } + + public void unsetJvmPoolMetaspaceUsage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __JVMPOOLMETASPACEUSAGE_ISSET_ID); + } + + /** Returns true if field jvmPoolMetaspaceUsage is set (has been assigned a value) and false otherwise */ + public boolean isSetJvmPoolMetaspaceUsage() { + return EncodingUtils.testBit(__isset_bitfield, __JVMPOOLMETASPACEUSAGE_ISSET_ID); + } + + public void setJvmPoolMetaspaceUsageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __JVMPOOLMETASPACEUSAGE_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case TYPE: @@ -458,6 +669,54 @@ public void setFieldValue(_Fields field, Object value) { } break; + case JVM_POOL_CODE_CACHE_USAGE: + if (value == null) { + unsetJvmPoolCodeCacheUsage(); + } else { + setJvmPoolCodeCacheUsage((Long)value); + } + break; + + case JVM_POOL_EDEN_SPACE_USAGE: + if (value == null) { + unsetJvmPoolEdenSpaceUsage(); + } else { + setJvmPoolEdenSpaceUsage((Long)value); + } + break; + + case JVM_POOL_OLD_GEN_USAGE: + if (value == null) { + unsetJvmPoolOldGenUsage(); + } else { + setJvmPoolOldGenUsage((Long)value); + } + break; + + case JVM_POOL_SURVIVOR_SPACE_USAGE: + if (value == null) { + unsetJvmPoolSurvivorSpaceUsage(); + } else { + setJvmPoolSurvivorSpaceUsage((Long)value); + } + break; + + case JVM_POOL_PERM_GEN_USAGE: + if (value == null) { + unsetJvmPoolPermGenUsage(); + } else { + setJvmPoolPermGenUsage((Long)value); + } + break; + + case JVM_POOL_METASPACE_USAGE: + if (value == null) { + unsetJvmPoolMetaspaceUsage(); + } else { + setJvmPoolMetaspaceUsage((Long)value); + } + break; + } } @@ -484,6 +743,24 @@ public Object getFieldValue(_Fields field) { case JVM_GC_OLD_TIME: return Long.valueOf(getJvmGcOldTime()); + case JVM_POOL_CODE_CACHE_USAGE: + return Long.valueOf(getJvmPoolCodeCacheUsage()); + + case JVM_POOL_EDEN_SPACE_USAGE: + return Long.valueOf(getJvmPoolEdenSpaceUsage()); + + case JVM_POOL_OLD_GEN_USAGE: + return Long.valueOf(getJvmPoolOldGenUsage()); + + case JVM_POOL_SURVIVOR_SPACE_USAGE: + return Long.valueOf(getJvmPoolSurvivorSpaceUsage()); + + case JVM_POOL_PERM_GEN_USAGE: + return Long.valueOf(getJvmPoolPermGenUsage()); + + case JVM_POOL_METASPACE_USAGE: + return Long.valueOf(getJvmPoolMetaspaceUsage()); + } throw new IllegalStateException(); } @@ -509,6 +786,18 @@ public boolean isSet(_Fields field) { return isSetJvmGcOldCount(); case JVM_GC_OLD_TIME: return isSetJvmGcOldTime(); + case JVM_POOL_CODE_CACHE_USAGE: + return isSetJvmPoolCodeCacheUsage(); + case JVM_POOL_EDEN_SPACE_USAGE: + return isSetJvmPoolEdenSpaceUsage(); + case JVM_POOL_OLD_GEN_USAGE: + return isSetJvmPoolOldGenUsage(); + case JVM_POOL_SURVIVOR_SPACE_USAGE: + return isSetJvmPoolSurvivorSpaceUsage(); + case JVM_POOL_PERM_GEN_USAGE: + return isSetJvmPoolPermGenUsage(); + case JVM_POOL_METASPACE_USAGE: + return isSetJvmPoolMetaspaceUsage(); } throw new IllegalStateException(); } @@ -589,6 +878,60 @@ public boolean equals(TJvmGc that) { return false; } + boolean this_present_jvmPoolCodeCacheUsage = true; + boolean that_present_jvmPoolCodeCacheUsage = true; + if (this_present_jvmPoolCodeCacheUsage || that_present_jvmPoolCodeCacheUsage) { + if (!(this_present_jvmPoolCodeCacheUsage && that_present_jvmPoolCodeCacheUsage)) + return false; + if (this.jvmPoolCodeCacheUsage != that.jvmPoolCodeCacheUsage) + return false; + } + + boolean this_present_jvmPoolEdenSpaceUsage = true; + boolean that_present_jvmPoolEdenSpaceUsage = true; + if (this_present_jvmPoolEdenSpaceUsage || that_present_jvmPoolEdenSpaceUsage) { + if (!(this_present_jvmPoolEdenSpaceUsage && that_present_jvmPoolEdenSpaceUsage)) + return false; + if (this.jvmPoolEdenSpaceUsage != that.jvmPoolEdenSpaceUsage) + return false; + } + + boolean this_present_jvmPoolOldGenUsage = true; + boolean that_present_jvmPoolOldGenUsage = true; + if (this_present_jvmPoolOldGenUsage || that_present_jvmPoolOldGenUsage) { + if (!(this_present_jvmPoolOldGenUsage && that_present_jvmPoolOldGenUsage)) + return false; + if (this.jvmPoolOldGenUsage != that.jvmPoolOldGenUsage) + return false; + } + + boolean this_present_jvmPoolSurvivorSpaceUsage = true; + boolean that_present_jvmPoolSurvivorSpaceUsage = true; + if (this_present_jvmPoolSurvivorSpaceUsage || that_present_jvmPoolSurvivorSpaceUsage) { + if (!(this_present_jvmPoolSurvivorSpaceUsage && that_present_jvmPoolSurvivorSpaceUsage)) + return false; + if (this.jvmPoolSurvivorSpaceUsage != that.jvmPoolSurvivorSpaceUsage) + return false; + } + + boolean this_present_jvmPoolPermGenUsage = true && this.isSetJvmPoolPermGenUsage(); + boolean that_present_jvmPoolPermGenUsage = true && that.isSetJvmPoolPermGenUsage(); + if (this_present_jvmPoolPermGenUsage || that_present_jvmPoolPermGenUsage) { + if (!(this_present_jvmPoolPermGenUsage && that_present_jvmPoolPermGenUsage)) + return false; + if (this.jvmPoolPermGenUsage != that.jvmPoolPermGenUsage) + return false; + } + + boolean this_present_jvmPoolMetaspaceUsage = true && this.isSetJvmPoolMetaspaceUsage(); + boolean that_present_jvmPoolMetaspaceUsage = true && that.isSetJvmPoolMetaspaceUsage(); + if (this_present_jvmPoolMetaspaceUsage || that_present_jvmPoolMetaspaceUsage) { + if (!(this_present_jvmPoolMetaspaceUsage && that_present_jvmPoolMetaspaceUsage)) + return false; + if (this.jvmPoolMetaspaceUsage != that.jvmPoolMetaspaceUsage) + return false; + } + return true; } @@ -631,6 +974,36 @@ public int hashCode() { if (present_jvmGcOldTime) list.add(jvmGcOldTime); + boolean present_jvmPoolCodeCacheUsage = true; + list.add(present_jvmPoolCodeCacheUsage); + if (present_jvmPoolCodeCacheUsage) + list.add(jvmPoolCodeCacheUsage); + + boolean present_jvmPoolEdenSpaceUsage = true; + list.add(present_jvmPoolEdenSpaceUsage); + if (present_jvmPoolEdenSpaceUsage) + list.add(jvmPoolEdenSpaceUsage); + + boolean present_jvmPoolOldGenUsage = true; + list.add(present_jvmPoolOldGenUsage); + if (present_jvmPoolOldGenUsage) + list.add(jvmPoolOldGenUsage); + + boolean present_jvmPoolSurvivorSpaceUsage = true; + list.add(present_jvmPoolSurvivorSpaceUsage); + if (present_jvmPoolSurvivorSpaceUsage) + list.add(jvmPoolSurvivorSpaceUsage); + + boolean present_jvmPoolPermGenUsage = true && (isSetJvmPoolPermGenUsage()); + list.add(present_jvmPoolPermGenUsage); + if (present_jvmPoolPermGenUsage) + list.add(jvmPoolPermGenUsage); + + boolean present_jvmPoolMetaspaceUsage = true && (isSetJvmPoolMetaspaceUsage()); + list.add(present_jvmPoolMetaspaceUsage); + if (present_jvmPoolMetaspaceUsage) + list.add(jvmPoolMetaspaceUsage); + return list.hashCode(); } @@ -712,6 +1085,66 @@ public int compareTo(TJvmGc other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetJvmPoolCodeCacheUsage()).compareTo(other.isSetJvmPoolCodeCacheUsage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJvmPoolCodeCacheUsage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jvmPoolCodeCacheUsage, other.jvmPoolCodeCacheUsage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetJvmPoolEdenSpaceUsage()).compareTo(other.isSetJvmPoolEdenSpaceUsage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJvmPoolEdenSpaceUsage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jvmPoolEdenSpaceUsage, other.jvmPoolEdenSpaceUsage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetJvmPoolOldGenUsage()).compareTo(other.isSetJvmPoolOldGenUsage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJvmPoolOldGenUsage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jvmPoolOldGenUsage, other.jvmPoolOldGenUsage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetJvmPoolSurvivorSpaceUsage()).compareTo(other.isSetJvmPoolSurvivorSpaceUsage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJvmPoolSurvivorSpaceUsage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jvmPoolSurvivorSpaceUsage, other.jvmPoolSurvivorSpaceUsage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetJvmPoolPermGenUsage()).compareTo(other.isSetJvmPoolPermGenUsage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJvmPoolPermGenUsage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jvmPoolPermGenUsage, other.jvmPoolPermGenUsage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetJvmPoolMetaspaceUsage()).compareTo(other.isSetJvmPoolMetaspaceUsage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJvmPoolMetaspaceUsage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jvmPoolMetaspaceUsage, other.jvmPoolMetaspaceUsage); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -763,6 +1196,34 @@ public String toString() { sb.append("jvmGcOldTime:"); sb.append(this.jvmGcOldTime); first = false; + if (!first) sb.append(", "); + sb.append("jvmPoolCodeCacheUsage:"); + sb.append(this.jvmPoolCodeCacheUsage); + first = false; + if (!first) sb.append(", "); + sb.append("jvmPoolEdenSpaceUsage:"); + sb.append(this.jvmPoolEdenSpaceUsage); + first = false; + if (!first) sb.append(", "); + sb.append("jvmPoolOldGenUsage:"); + sb.append(this.jvmPoolOldGenUsage); + first = false; + if (!first) sb.append(", "); + sb.append("jvmPoolSurvivorSpaceUsage:"); + sb.append(this.jvmPoolSurvivorSpaceUsage); + first = false; + if (isSetJvmPoolPermGenUsage()) { + if (!first) sb.append(", "); + sb.append("jvmPoolPermGenUsage:"); + sb.append(this.jvmPoolPermGenUsage); + first = false; + } + if (isSetJvmPoolMetaspaceUsage()) { + if (!first) sb.append(", "); + sb.append("jvmPoolMetaspaceUsage:"); + sb.append(this.jvmPoolMetaspaceUsage); + first = false; + } sb.append(")"); return sb.toString(); } @@ -864,6 +1325,54 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TJvmGc struct) thro org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 8: // JVM_POOL_CODE_CACHE_USAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.jvmPoolCodeCacheUsage = iprot.readI64(); + struct.setJvmPoolCodeCacheUsageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // JVM_POOL_EDEN_SPACE_USAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.jvmPoolEdenSpaceUsage = iprot.readI64(); + struct.setJvmPoolEdenSpaceUsageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // JVM_POOL_OLD_GEN_USAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.jvmPoolOldGenUsage = iprot.readI64(); + struct.setJvmPoolOldGenUsageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // JVM_POOL_SURVIVOR_SPACE_USAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.jvmPoolSurvivorSpaceUsage = iprot.readI64(); + struct.setJvmPoolSurvivorSpaceUsageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // JVM_POOL_PERM_GEN_USAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.jvmPoolPermGenUsage = iprot.readI64(); + struct.setJvmPoolPermGenUsageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // JVM_POOL_METASPACE_USAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.jvmPoolMetaspaceUsage = iprot.readI64(); + struct.setJvmPoolMetaspaceUsageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -900,6 +1409,28 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TJvmGc struct) thr oprot.writeFieldBegin(JVM_GC_OLD_TIME_FIELD_DESC); oprot.writeI64(struct.jvmGcOldTime); oprot.writeFieldEnd(); + oprot.writeFieldBegin(JVM_POOL_CODE_CACHE_USAGE_FIELD_DESC); + oprot.writeI64(struct.jvmPoolCodeCacheUsage); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(JVM_POOL_EDEN_SPACE_USAGE_FIELD_DESC); + oprot.writeI64(struct.jvmPoolEdenSpaceUsage); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(JVM_POOL_OLD_GEN_USAGE_FIELD_DESC); + oprot.writeI64(struct.jvmPoolOldGenUsage); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(JVM_POOL_SURVIVOR_SPACE_USAGE_FIELD_DESC); + oprot.writeI64(struct.jvmPoolSurvivorSpaceUsage); + oprot.writeFieldEnd(); + if (struct.isSetJvmPoolPermGenUsage()) { + oprot.writeFieldBegin(JVM_POOL_PERM_GEN_USAGE_FIELD_DESC); + oprot.writeI64(struct.jvmPoolPermGenUsage); + oprot.writeFieldEnd(); + } + if (struct.isSetJvmPoolMetaspaceUsage()) { + oprot.writeFieldBegin(JVM_POOL_METASPACE_USAGE_FIELD_DESC); + oprot.writeI64(struct.jvmPoolMetaspaceUsage); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -939,7 +1470,25 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TJvmGc struct) thro if (struct.isSetJvmGcOldTime()) { optionals.set(6); } - oprot.writeBitSet(optionals, 7); + if (struct.isSetJvmPoolCodeCacheUsage()) { + optionals.set(7); + } + if (struct.isSetJvmPoolEdenSpaceUsage()) { + optionals.set(8); + } + if (struct.isSetJvmPoolOldGenUsage()) { + optionals.set(9); + } + if (struct.isSetJvmPoolSurvivorSpaceUsage()) { + optionals.set(10); + } + if (struct.isSetJvmPoolPermGenUsage()) { + optionals.set(11); + } + if (struct.isSetJvmPoolMetaspaceUsage()) { + optionals.set(12); + } + oprot.writeBitSet(optionals, 13); if (struct.isSetType()) { oprot.writeI32(struct.type.getValue()); } @@ -961,12 +1510,30 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TJvmGc struct) thro if (struct.isSetJvmGcOldTime()) { oprot.writeI64(struct.jvmGcOldTime); } + if (struct.isSetJvmPoolCodeCacheUsage()) { + oprot.writeI64(struct.jvmPoolCodeCacheUsage); + } + if (struct.isSetJvmPoolEdenSpaceUsage()) { + oprot.writeI64(struct.jvmPoolEdenSpaceUsage); + } + if (struct.isSetJvmPoolOldGenUsage()) { + oprot.writeI64(struct.jvmPoolOldGenUsage); + } + if (struct.isSetJvmPoolSurvivorSpaceUsage()) { + oprot.writeI64(struct.jvmPoolSurvivorSpaceUsage); + } + if (struct.isSetJvmPoolPermGenUsage()) { + oprot.writeI64(struct.jvmPoolPermGenUsage); + } + if (struct.isSetJvmPoolMetaspaceUsage()) { + oprot.writeI64(struct.jvmPoolMetaspaceUsage); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TJvmGc struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); + BitSet incoming = iprot.readBitSet(13); if (incoming.get(0)) { struct.type = com.navercorp.pinpoint.thrift.dto.TJvmGcType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); @@ -995,6 +1562,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TJvmGc struct) throw struct.jvmGcOldTime = iprot.readI64(); struct.setJvmGcOldTimeIsSet(true); } + if (incoming.get(7)) { + struct.jvmPoolCodeCacheUsage = iprot.readI64(); + struct.setJvmPoolCodeCacheUsageIsSet(true); + } + if (incoming.get(8)) { + struct.jvmPoolEdenSpaceUsage = iprot.readI64(); + struct.setJvmPoolEdenSpaceUsageIsSet(true); + } + if (incoming.get(9)) { + struct.jvmPoolOldGenUsage = iprot.readI64(); + struct.setJvmPoolOldGenUsageIsSet(true); + } + if (incoming.get(10)) { + struct.jvmPoolSurvivorSpaceUsage = iprot.readI64(); + struct.setJvmPoolSurvivorSpaceUsageIsSet(true); + } + if (incoming.get(11)) { + struct.jvmPoolPermGenUsage = iprot.readI64(); + struct.setJvmPoolPermGenUsageIsSet(true); + } + if (incoming.get(12)) { + struct.jvmPoolMetaspaceUsage = iprot.readI64(); + struct.setJvmPoolMetaspaceUsageIsSet(true); + } } } diff --git a/thrift/src/main/thrift/Pinpoint.thrift b/thrift/src/main/thrift/Pinpoint.thrift index c7da81bce8688..fa07518e44c4d 100644 --- a/thrift/src/main/thrift/Pinpoint.thrift +++ b/thrift/src/main/thrift/Pinpoint.thrift @@ -46,6 +46,12 @@ struct TJvmGc { 5: i64 jvmMemoryNonHeapMax 6: i64 jvmGcOldCount 7: i64 jvmGcOldTime + 8: i64 jvmPoolCodeCacheUsage + 9: i64 jvmPoolEdenSpaceUsage + 10: i64 jvmPoolOldGenUsage + 11: i64 jvmPoolSurvivorSpaceUsage + 12: optional i64 jvmPoolPermGenUsage + 13: optional i64 jvmPoolMetaspaceUsage } struct TCpuLoad {