#ifndef TRACEFILES_TRACEEVENTCLASSES_HPP #define TRACEFILES_TRACEEVENTCLASSES_HPP // On purpose outside the INCLUDE_TRACE // Some parts of traceEvent.hpp are used outside of // INCLUDE_TRACE #include "memory/resourceArea.hpp" #include "tracefiles/traceTypes.hpp" #include "trace/traceEvent.hpp" #include "utilities/macros.hpp" #include "utilities/ticks.hpp" #if INCLUDE_TRACE #include "trace/traceStream.hpp" #include "utilities/ostream.hpp" #else // !INCLUDE_TRACE class TraceEvent { public: TraceEvent() {} void set_starttime(const Ticks& time) {} void set_endtime(const Ticks& time) {} bool should_commit() const { return false; } static bool is_enabled() { return false; } void commit() const {} }; #endif // INCLUDE_TRACE #endif // TRACEFILES_TRACEEVENTCLASSES_HPP struct TraceStruct { private: public: void writeStruct(TraceStream& ts) { } }; struct TraceStruct { public: }; { public: }; { public: static const bool hasThread = ; static const bool hasStackTrace = ; static const bool isInstant = ; static const bool isRequestable = ; static const TraceEventId eventId = ; private: void writeEventContent(void) { TraceStream ts(*tty); ts.print(": ["); ts.print("]\n"); } public: bool should_write(void) { return true; } void writeEvent(void) { bool thread_has_resource = Thread::current() != NULL; ResourceArea *area = thread_has_resource ? Thread::current()->resource_area() : new (mtTracing)ResourceArea(Chunk::non_pool_size); ResourceMark rm(area); if (UseLockedTracing) { ttyLocker lock; writeEventContent(); } else { writeEventContent(); } if (!thread_has_resource) { delete area; } } }; #if INCLUDE_TRACE #else #endif #if INCLUDE_TRACE #else #endif ts.print(", "); ts.print(", ");