src/hotspot/share/gc/shared/objectCountEventSender.hpp
changeset 50113 caf115bb98ad
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
--- a/src/hotspot/share/gc/shared/objectCountEventSender.hpp	Tue May 15 11:28:29 2018 -0700
+++ b/src/hotspot/share/gc/shared/objectCountEventSender.hpp	Tue May 15 20:24:34 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -27,15 +27,25 @@
 
 #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 Ticks;
+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();
+
   static void send(const KlassInfoEntry* entry, const Ticks& timestamp);
   static bool should_send_event();
 };