summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-11-12 12:58:53 +0100
committerNeal H. Walfield <neal@gnu.org>2008-11-12 12:58:53 +0100
commita6e69fe0f8f989213cc036b6bdd52b6098f1e5d9 (patch)
tree02c677b36da146b836b96b1b17f1ee3edbb8108d /hurd
parente8d5499c2e6cec827a464f10c21b29b6fc241ec4 (diff)
Print call site when dumping a trace buffer.
2008-11-12 Neal H. Walfield <neal@gnu.org> * trace.h (trace_buffer_dump): Take additional arguments func and line. Print them. (trace_buffer_dump): Also define as a macro.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/ChangeLog6
-rw-r--r--hurd/trace.h8
2 files changed, 12 insertions, 2 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
index 89c825e..d75c512 100644
--- a/hurd/ChangeLog
+++ b/hurd/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-12 Neal H. Walfield <neal@gnu.org>
+
+ * trace.h (trace_buffer_dump): Take additional arguments func and
+ line. Print them.
+ (trace_buffer_dump): Also define as a macro.
+
2008-11-11 Neal H. Walfield <neal@gnu.org>
* cap.h (struct cap): Make priority signed.
diff --git a/hurd/trace.h b/hurd/trace.h
index 52978a0..24c1c89 100644
--- a/hurd/trace.h
+++ b/hurd/trace.h
@@ -122,12 +122,14 @@ trace_buffer_add (const char *func, const int lineno,
trace_buffer_add (__FUNCTION__, __LINE__, buf, fmt, ##__VA_ARGS__)
static inline void
-trace_buffer_dump (struct trace_buffer *buffer, int count)
+trace_buffer_dump (const char *func, int line,
+ struct trace_buffer *buffer, int count)
{
if (! buffer->nolock)
ss_mutex_lock (&buffer->lock);
- s_printf ("Dumping trace buffer %s(%x)\n", buffer->name, buffer->id);
+ s_printf ("%s:%d: Dumping trace buffer %s(%x)\n",
+ func, line, buffer->name, buffer->id);
if (buffer->written == 0)
{
@@ -201,5 +203,7 @@ trace_buffer_dump (struct trace_buffer *buffer, int count)
if (! buffer->nolock)
ss_mutex_unlock (&buffer->lock);
}
+#define trace_buffer_dump(buffer, count) \
+ trace_buffer_dump (__FUNCTION__, __LINE__, buffer, count)
#endif /* _HURD_TRACE_H */