sla@5237: /* sla@5237: * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. sla@5237: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. sla@5237: * sla@5237: * This code is free software; you can redistribute it and/or modify it sla@5237: * under the terms of the GNU General Public License version 2 only, as sla@5237: * published by the Free Software Foundation. sla@5237: * sla@5237: * This code is distributed in the hope that it will be useful, but WITHOUT sla@5237: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or sla@5237: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License sla@5237: * version 2 for more details (a copy is included in the LICENSE file that sla@5237: * accompanied this code). sla@5237: * sla@5237: * You should have received a copy of the GNU General Public License version sla@5237: * 2 along with this work; if not, write to the Free Software Foundation, sla@5237: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. sla@5237: * sla@5237: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA sla@5237: * or visit www.oracle.com if you need additional information or have any sla@5237: * questions. sla@5237: * sla@5237: */ sla@5237: #ifndef SHARE_VM_TRACE_TRACEBACKEND_HPP sla@5237: #define SHARE_VM_TRACE_TRACEBACKEND_HPP sla@5237: sla@5237: #include "utilities/macros.hpp" sla@5237: sla@5237: #if INCLUDE_TRACE sla@5237: sla@5237: #include "runtime/globals.hpp" sla@5237: #include "runtime/os.hpp" sla@5237: #include "trace/traceTime.hpp" sla@5237: #include "tracefiles/traceEventIds.hpp" sla@5237: sla@5237: class TraceBackend { sla@5237: public: sla@5237: static bool enabled(void) { sla@5237: return EnableTracing; sla@5237: } sla@5237: sla@5237: static bool is_event_enabled(TraceEventId id) { sla@5237: return enabled(); sla@5237: } sla@5237: sla@5237: static TracingTime time() { sla@5237: return os::elapsed_counter(); sla@5237: } sla@5237: sla@5237: static TracingTime time_adjustment(jlong time) { sla@5237: return time; sla@5237: } sla@5237: sla@5237: static void on_unloading_classes(void) { sla@5237: } sla@5237: }; sla@5237: sla@5237: class TraceThreadData { sla@5237: public: sla@5237: TraceThreadData() {} sla@5237: }; sla@5237: sla@5237: typedef TraceBackend Tracing; sla@5237: sla@5237: #else /* INCLUDE_TRACE */ sla@5237: sla@5237: #include "trace/noTraceBackend.hpp" sla@5237: sla@5237: #endif /* INCLUDE_TRACE */ sla@5237: #endif /* SHARE_VM_TRACE_TRACEBACKEND_HPP */