All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: [patch 3/3] Linux Kernel Markers - fix samples to follow format string standard
Date: Tue, 13 Nov 2007 13:39:26 -0500	[thread overview]
Message-ID: <20071113184249.118725616@polymtl.ca> (raw)
In-Reply-To: 20071113183923.190808360@polymtl.ca

[-- Attachment #1: markers-fix-example-format-string.patch --]
[-- Type: text/plain, Size: 1641 bytes --]

Add the field names to marker example format string.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
 samples/markers/marker-example.c |    3 ++-
 samples/markers/probe-example.c  |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6-lttng/samples/markers/marker-example.c
===================================================================
--- linux-2.6-lttng.orig/samples/markers/marker-example.c	2007-11-03 20:56:35.000000000 -0400
+++ linux-2.6-lttng/samples/markers/marker-example.c	2007-11-03 20:57:08.000000000 -0400
@@ -19,7 +19,8 @@ static int my_open(struct inode *inode, 
 {
 	int i;
 
-	trace_mark(subsystem_event, "%d %s", 123, "example string");
+	trace_mark(subsystem_event, "integer %d string %s", 123,
+		"example string");
 	for (i = 0; i < 10; i++)
 		trace_mark(subsystem_eventb, MARK_NOARGS);
 	return -EPERM;
Index: linux-2.6-lttng/samples/markers/probe-example.c
===================================================================
--- linux-2.6-lttng.orig/samples/markers/probe-example.c	2007-11-03 20:57:38.000000000 -0400
+++ linux-2.6-lttng/samples/markers/probe-example.c	2007-11-03 20:57:51.000000000 -0400
@@ -53,7 +53,7 @@ void probe_subsystem_eventb(const struct
 static struct probe_data probe_array[] =
 {
 	{	.name = "subsystem_event",
-		.format = "%d %s",
+		.format = "integer %d string %s",
 		.probe_func = probe_subsystem_event },
 	{	.name = "subsystem_eventb",
 		.format = MARK_NOARGS,

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

      parent reply	other threads:[~2007-11-13 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13 18:39 [patch 0/3] Linux Kernel Markers Fixes Mathieu Desnoyers
2007-11-13 18:39 ` [patch 1/3] Linux Kernel Markers - Fix marker mutex not taken upon module load Mathieu Desnoyers
2007-11-13 18:39 ` [patch 2/3] Linux Kernel Markers - Document format string Mathieu Desnoyers
2007-11-13 18:39 ` Mathieu Desnoyers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071113184249.118725616@polymtl.ca \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.