]> git.cworth.org Git - apitrace/blobdiff - common/trace_writer.hpp
Use skiplist-based FastCallSet within trace::CallSet
[apitrace] / common / trace_writer.hpp
index f7105880d0d63c31cf0d82dda214d15f7e1bd8bd..a46b43edc487f15faff6f22bc68fade0a57924fa 100644 (file)
@@ -79,6 +79,9 @@ namespace trace {
         void beginStruct(const StructSig *sig);
         inline void endStruct(void) {}
 
+        void beginRepr(void);
+        inline void endRepr(void) {}
+
         void writeBool(bool value);
         void writeSInt(signed long long value);
         void writeUInt(unsigned long long value);
@@ -91,7 +94,7 @@ namespace trace {
         void writeEnum(const EnumSig *sig, signed long long value);
         void writeBitmask(const BitmaskSig *sig, unsigned long long value);
         void writeNull(void);
-        void writeOpaque(const void *ptr);
+        void writePointer(unsigned long long addr);
 
         void writeCall(Call *call);
 
@@ -105,46 +108,6 @@ namespace trace {
 
     };
 
-    extern const FunctionSig memcpy_sig;
-    extern const FunctionSig malloc_sig;
-    extern const FunctionSig free_sig;
-    extern const FunctionSig realloc_sig;
-
-    /**
-     * A specialized Writer class, mean to trace the current process.
-     *
-     * In particular:
-     * - it creates a trace file based on the current process name
-     * - uses mutexes to allow tracing from multiple threades
-     * - flushes the output to ensure the last call is traced in event of
-     *   abnormal termination
-     */
-    class LocalWriter : public Writer {
-    protected:
-        int acquired;
-
-    public:
-        /**
-         * Should never called directly -- use localWriter singleton below instead.
-         */
-        LocalWriter();
-        ~LocalWriter();
-
-        void open(void);
-
-        unsigned beginEnter(const FunctionSig *sig);
-        void endEnter(void);
-
-        void beginLeave(unsigned call);
-        void endLeave(void);
-
-        void flush(void);
-    };
-
-    /**
-     * Singleton.
-     */
-    extern LocalWriter localWriter;
-}
+} /* namespace trace */
 
 #endif /* _TRACE_WRITER_HPP_ */