Path: blob/master/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp
41155 views
/*1* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP25#define SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP2627#include "memory/allocation.hpp"28#include "jfr/utilities/jfrTypes.hpp"2930class EdgeStore;31class InstanceKlass;32class JavaThread;33class JfrCheckpointWriter;34class JfrStackTrace;35class Klass;36class ObjectSample;37class ObjectSampleMarker;38class ObjectSampler;39class Thread;4041class ObjectSampleCheckpoint : AllStatic {42friend class EventEmitter;43friend class PathToGcRootsOperation;44friend class StackTraceBlobInstaller;45private:46static void add_to_leakp_set(const InstanceKlass* ik, traceid method_id);47static int save_mark_words(const ObjectSampler* sampler, ObjectSampleMarker& marker, bool emit_all);48static void write_stacktrace(const JfrStackTrace* trace, JfrCheckpointWriter& writer);49static void write(const ObjectSampler* sampler, EdgeStore* edge_store, bool emit_all, Thread* thread);50public:51static void on_type_set(JfrCheckpointWriter& writer);52static void on_type_set_unload(JfrCheckpointWriter& writer);53static void on_thread_exit(JavaThread* jt);54static void on_rotation(const ObjectSampler* sampler);55};5657#endif // SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP585960