< prev index next >

src/hotspot/share/gc/shared/objectCountEventSender.hpp

Print this page
rev 49619 : JEP 328 : Flight Recorder open source preview

*** 1,7 **** /* ! * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * 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. --- 1,7 ---- /* ! * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * 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.
*** 25,43 **** #ifndef SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP #define SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP #include "gc/shared/gcTrace.hpp" #include "memory/allocation.hpp" #include "utilities/macros.hpp" #if INCLUDE_SERVICES class KlassInfoEntry; ! class Ticks; class ObjectCountEventSender : public AllStatic { public: static void send(const KlassInfoEntry* entry, const Ticks& timestamp); static bool should_send_event(); }; #endif // INCLUDE_SERVICES --- 25,60 ---- #ifndef SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP #define SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP #include "gc/shared/gcTrace.hpp" #include "memory/allocation.hpp" + #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" + #include "utilities/ticks.hpp" #if INCLUDE_SERVICES class KlassInfoEntry; ! class Klass; class ObjectCountEventSender : public AllStatic { + static bool _should_send_requestable_event; + + template <typename T> + static void send_event_if_enabled(Klass* klass, jlong count, julong size, const Ticks& timestamp); + + public: + static void enable_requestable_event(); + static void disable_requestable_event(); + public: + // The following two functions have the exact same signature as + // hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.hpp + // + // This file will replace the open file if a closed build is performed. + // These function signatures can therefore not be changed if the open + // signatures aren't changed as well. static void send(const KlassInfoEntry* entry, const Ticks& timestamp); static bool should_send_event(); }; #endif // INCLUDE_SERVICES
< prev index next >