Patchwork [2/3] trace: Format strings must begin/end with double quotes

login
register
mail settings
Submitter Stefan Hajnoczi
Date Oct. 18, 2010, 12:42 p.m.
Message ID <1287405776-19651-3-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/68175/
State New
Headers show

Comments

Stefan Hajnoczi - Oct. 18, 2010, 12:42 p.m.
Document the restriction that format strings must begin and end with
double quotes.  This is for easy parsing since we don't run cpp over
trace-events.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 docs/tracing.txt |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/docs/tracing.txt b/docs/tracing.txt
index 5504850..963c504 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -74,7 +74,10 @@  Trace events should use types as follows:
 
 Format strings should reflect the types defined in the trace event.  Take
 special care to use PRId64 and PRIu64 for int64_t and uint64_t types,
-respectively.  This ensures portability between 32- and 64-bit platforms.
+respectively.  This ensures portability between 32- and 64-bit platforms.  Note
+that format strings must begin and end with double quotes.  When using
+portability macros, ensure they are preceded and followed by double quotes:
+"value %"PRIx64"".
 
 === Hints for adding new trace events ===