/* * Copyright (c) 2014, 2015, Dynatrace and/or its affiliates. All rights reserved. * * This file is part of the Lock Contention Tracing Subsystem for the HotSpot * Virtual Machine, which is developed at Christian Doppler Laboratory on * Monitoring and Evolution of Very-Large-Scale Software Systems. Please * contact us at if you need additional information * or have any questions. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work. If not, see . * */ package sun.evtracing.parser; import sun.evtracing.parser.TraceEventType; import sun.evtracing.parser.metadata.JavaClass; import sun.evtracing.parser.metadata.MetadataRef; import sun.evtracing.processing.TraceEventHandler; public class MonitorInflateEvent extends MonitorEvent { public static final TraceEventType EVENT_TYPE = TraceEventType.MonitorInflate; public static MonitorInflateEvent parse(TraceReader reader, long thread) { TraceEventType eventType = reader.readEventType(); assert eventType == EVENT_TYPE; long timestamp = reader.readTimestamp(); long sequenceNumber = reader.readSequenceNumber(); long monitor = reader.readMonitor(); int object = reader.readObject(); MetadataRef clazz = reader.readClass(); return new MonitorInflateEvent(thread, timestamp, sequenceNumber, monitor, object, clazz); } private final int object; private final MetadataRef clazz; protected MonitorInflateEvent(long thread, long timestamp, long sequenceNumber, long monitor, int object, MetadataRef klass) { super(thread, timestamp, sequenceNumber, monitor); this.object = object; this.clazz = klass; } @Override public TraceEventType type() { return EVENT_TYPE; } public int object() { return object; } public MetadataRef clazz() { return clazz; } @Override public void accept(TraceEventHandler handler) { handler.monitorInflate(this); } }