< prev index next >

src/hotspot/share/jfr/support/jfrIntrinsics.hpp

Print this page
*** 1,7 ***
  /*
! * Copyright (c) 2012, 2019, 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) 2012, 2020, 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.

*** 26,30 ***
  #define SHARE_JFR_SUPPORT_JFRINTRINSICS_HPP
  
  #include "utilities/macros.hpp"
  
  #if INCLUDE_JFR
! #include "jfr/support/jfrKlassExtension.hpp"
- #include "jfr/support/jfrThreadExtension.hpp"
  #include "jfr/utilities/jfrTime.hpp"
! #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdMacros.hpp"
  
  #define JFR_TEMPLATES(template) \
    template(jdk_jfr_internal_JVM,                                      "jdk/jfr/internal/JVM")                     \
    template(jdk_jfr_internal_handlers_EventHandler_signature,          "Ljdk/jfr/internal/handlers/EventHandler;") \
    template(eventHandler_name,                                         "eventHandler")                             \
  
! #define JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)                              \
!   do_intrinsic(_counterTime,        jdk_jfr_internal_JVM, counterTime_name, void_long_signature, F_SN)       \
!     do_name(     counterTime_name,                             "counterTime")                                \
!   do_intrinsic(_getClassId,         jdk_jfr_internal_JVM, getClassId_name, class_long_signature, F_SN)       \
!     do_name(     getClassId_name,                              "getClassId")                                 \
-   do_intrinsic(_getEventWriter,   jdk_jfr_internal_JVM, getEventWriter_name, void_object_signature, F_SN)    \
-     do_name(     getEventWriter_name,                          "getEventWriter")                             \
- 
- #define JFR_HAVE_INTRINSICS
- #define JFR_TIME_FUNCTION JfrTime::time_function()
  
  #else // !INCLUDE_JFR
  
  #define JFR_TEMPLATES(template)
  #define JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)
--- 26,37 ---
  #define SHARE_JFR_SUPPORT_JFRINTRINSICS_HPP
  
  #include "utilities/macros.hpp"
  
  #if INCLUDE_JFR
! #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp"
  #include "jfr/utilities/jfrTime.hpp"
! #include "jfr/utilities/jfrTypes.hpp"
+ 
+ class JfrIntrinsicSupport {
+  public:
+   static void* get_event_writer(JavaThread* t);
+   static void* write_checkpoint(JavaThread* t, traceid tid);
+ };
+ 
+ #define JFR_HAVE_INTRINSICS
+ #define JFR_TIME_FUNCTION JfrTime::time_function()
+ #define JFR_GET_EVENT_WRITER_FUNCTION JfrIntrinsicSupport::get_event_writer
+ #define JFR_WRITE_CHECKPOINT_FUNCTION JfrIntrinsicSupport::write_checkpoint
+ #define JFR_EPOCH_GENERATION_FUNCTION JfrTraceIdEpoch::epoch_generation
  
  #define JFR_TEMPLATES(template) \
    template(jdk_jfr_internal_JVM,                                      "jdk/jfr/internal/JVM")                     \
    template(jdk_jfr_internal_handlers_EventHandler_signature,          "Ljdk/jfr/internal/handlers/EventHandler;") \
    template(eventHandler_name,                                         "eventHandler")                             \
+   template(void_eventWriter_signature,                                "()Ljdk/jfr/internal/EventWriter;")         \
  
! #define JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)                                   \
!   do_intrinsic(_counterTime,        jdk_jfr_internal_JVM, counterTime_name, void_long_signature, F_SN)            \
!     do_name(     counterTime_name,                             "counterTime")                                     \
!   do_intrinsic(_getEventWriter,   jdk_jfr_internal_JVM, getEventWriter_name, void_eventWriter_signature, F_SN)    \
!     do_name(     getEventWriter_name,                          "getEventWriter")                                  \
  
  #else // !INCLUDE_JFR
  
  #define JFR_TEMPLATES(template)
  #define JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)
< prev index next >