namespace Trace {
+ class File;
class Writer {
protected:
- void *g_gzFile;
+ File *m_file;
unsigned call_no;
std::vector<bool> functions;
*/
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 beginLeave(unsigned call);
void endLeave(void);
+
+ void flush(void);
};
+
+ /**
+ * Singleton.
+ */
+ extern LocalWriter localWriter;
}
#endif /* _TRACE_WRITER_HPP_ */