13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderData.inline.hpp"
27 #include "classfile/classLoaderDataGraph.hpp"
28 #include "classfile/moduleEntry.hpp"
29 #include "classfile/packageEntry.hpp"
30 #include "jfr/jfrEvents.hpp"
31 #include "jfr/periodic/jfrModuleEvent.hpp"
32 #include "jfr/utilities/jfrTime.hpp"
33 #include "runtime/mutexLocker.hpp"
34
35 // we want all periodic module events to have the same timestamp
36 static JfrTicks invocation_time;
37
38 typedef void (*EventFunc)(const void* iterated_address, const ModuleEntry* module);
39 class ModuleEventCallbackClosure : public ModuleClosure {
40 protected:
41 const EventFunc _event_func;
42 ModuleEventCallbackClosure(EventFunc ef) : _event_func(ef) {}
43 };
44
45 class ModuleDependencyClosure : public ModuleEventCallbackClosure {
46 private:
47 const ModuleEntry* const _module;
48 public:
49 ModuleDependencyClosure(const ModuleEntry* module, EventFunc ef) : ModuleEventCallbackClosure(ef), _module(module) {}
50 void do_module(ModuleEntry* entry);
51 };
52
53 class ModuleExportClosure : public ModuleEventCallbackClosure {
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderData.inline.hpp"
27 #include "classfile/classLoaderDataGraph.hpp"
28 #include "classfile/moduleEntry.hpp"
29 #include "classfile/packageEntry.hpp"
30 #include "jfr/jfrEvents.hpp"
31 #include "jfr/periodic/jfrModuleEvent.hpp"
32 #include "jfr/utilities/jfrTime.hpp"
33 #include "runtime/mutexLocker.inline.hpp"
34
35 // we want all periodic module events to have the same timestamp
36 static JfrTicks invocation_time;
37
38 typedef void (*EventFunc)(const void* iterated_address, const ModuleEntry* module);
39 class ModuleEventCallbackClosure : public ModuleClosure {
40 protected:
41 const EventFunc _event_func;
42 ModuleEventCallbackClosure(EventFunc ef) : _event_func(ef) {}
43 };
44
45 class ModuleDependencyClosure : public ModuleEventCallbackClosure {
46 private:
47 const ModuleEntry* const _module;
48 public:
49 ModuleDependencyClosure(const ModuleEntry* module, EventFunc ef) : ModuleEventCallbackClosure(ef), _module(module) {}
50 void do_module(ModuleEntry* entry);
51 };
52
53 class ModuleExportClosure : public ModuleEventCallbackClosure {
|