6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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.hpp"
27 #include "classfile/moduleEntry.hpp"
28 #include "classfile/packageEntry.hpp"
29 #include "jfr/jfrEvents.hpp"
30 #include "jfr/periodic/jfrModuleEvent.hpp"
31 #include "jfr/utilities/jfrTime.hpp"
32 #include "runtime/mutexLocker.hpp"
33
34 // we want all periodic module events to have the same timestamp
35 static JfrTicks invocation_time;
36
37 typedef void (*EventFunc)(const void* iterated_address, const ModuleEntry* module);
38 class ModuleEventCallbackClosure : public ModuleClosure {
39 protected:
40 const EventFunc _event_func;
41 ModuleEventCallbackClosure(EventFunc ef) : _event_func(ef) {}
42 };
43
44 class ModuleDependencyClosure : public ModuleEventCallbackClosure {
45 private:
46 const ModuleEntry* const _module;
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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;
|