< prev index next >

hotspot/src/share/vm/trace/traceBackend.hpp

Print this page
rev 6909 : 8065361: Fixup headers and definitions for INCLUDE_TRACE
Reviewed-by: sla, stefank


   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 #ifndef SHARE_VM_TRACE_TRACEBACKEND_HPP
  25 #define SHARE_VM_TRACE_TRACEBACKEND_HPP
  26 
  27 #include "utilities/macros.hpp"
  28 
  29 #if INCLUDE_TRACE
  30 
  31 #include "runtime/globals.hpp"
  32 #include "runtime/os.hpp"
  33 #include "trace/traceTime.hpp"
  34 #include "tracefiles/traceEventIds.hpp"
  35 
  36 class TraceBackend {
  37 public:
  38   static bool enabled(void) {
  39     return EnableTracing;
  40   }
  41 
  42   static bool is_event_enabled(TraceEventId id) {
  43     return enabled();
  44   }
  45 
  46   static TracingTime time() {
  47     return os::elapsed_counter();
  48   }
  49 
  50   static void on_unloading_classes(void) {
  51   }
  52 };
  53 
  54 class TraceThreadData {
  55 public:
  56     TraceThreadData() {}
  57 };
  58 
  59 typedef TraceBackend Tracing;
  60 
  61 #else /* INCLUDE_TRACE */
  62 
  63 #include "trace/noTraceBackend.hpp"
  64 
  65 #endif /* INCLUDE_TRACE */
  66 #endif /* SHARE_VM_TRACE_TRACEBACKEND_HPP */


   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 #ifndef SHARE_VM_TRACE_TRACEBACKEND_HPP
  25 #define SHARE_VM_TRACE_TRACEBACKEND_HPP
  26 
  27 #include "utilities/macros.hpp"

  28 #if INCLUDE_TRACE

  29 #include "runtime/globals.hpp"
  30 #include "runtime/os.hpp"
  31 #include "trace/traceTime.hpp"
  32 #include "tracefiles/traceEventIds.hpp"
  33 
  34 class TraceBackend {
  35 public:
  36   static bool enabled(void) {
  37     return EnableTracing;
  38   }
  39 
  40   static bool is_event_enabled(TraceEventId id) {
  41     return enabled();
  42   }
  43 
  44   static TracingTime time() {
  45     return os::elapsed_counter();
  46   }
  47 
  48   static void on_unloading_classes(void) {
  49   }
  50 };
  51 
  52 class TraceThreadData {
  53 public:
  54     TraceThreadData() {}
  55 };
  56 
  57 typedef TraceBackend Tracing;
  58 
  59 #else // !INCLUDE_TRACE

  60 #include "trace/noTraceBackend.hpp"
  61 #endif // INCLUDE_TRACE
  62 #endif // SHARE_VM_TRACE_TRACEBACKEND_HPP

< prev index next >