src/hotspot/share/gc/shared/objectCountEventSender.hpp
changeset 50113 caf115bb98ad
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
equal deleted inserted replaced
50112:7a2a740815b7 50113:caf115bb98ad
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2018, 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.
    25 #ifndef SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP
    25 #ifndef SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP
    26 #define SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP
    26 #define SHARE_VM_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP
    27 
    27 
    28 #include "gc/shared/gcTrace.hpp"
    28 #include "gc/shared/gcTrace.hpp"
    29 #include "memory/allocation.hpp"
    29 #include "memory/allocation.hpp"
       
    30 #include "utilities/globalDefinitions.hpp"
    30 #include "utilities/macros.hpp"
    31 #include "utilities/macros.hpp"
       
    32 #include "utilities/ticks.hpp"
    31 
    33 
    32 #if INCLUDE_SERVICES
    34 #if INCLUDE_SERVICES
    33 
    35 
    34 class KlassInfoEntry;
    36 class KlassInfoEntry;
    35 class Ticks;
    37 class Klass;
    36 
    38 
    37 class ObjectCountEventSender : public AllStatic {
    39 class ObjectCountEventSender : public AllStatic {
       
    40   static bool _should_send_requestable_event;
       
    41 
       
    42   template <typename T>
       
    43   static void send_event_if_enabled(Klass* klass, jlong count, julong size, const Ticks& timestamp);
       
    44 
    38  public:
    45  public:
       
    46   static void enable_requestable_event();
       
    47   static void disable_requestable_event();
       
    48 
    39   static void send(const KlassInfoEntry* entry, const Ticks& timestamp);
    49   static void send(const KlassInfoEntry* entry, const Ticks& timestamp);
    40   static bool should_send_event();
    50   static bool should_send_event();
    41 };
    51 };
    42 
    52 
    43 #endif // INCLUDE_SERVICES
    53 #endif // INCLUDE_SERVICES