All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] tools lib traceevent: Updates from trace-cmd
@ 2016-02-09 20:40 Steven Rostedt
  2016-02-09 20:40 ` [PATCH 1/4] tools lib traceevent: Fix time stamp rounding issue Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Steven Rostedt @ 2016-02-09 20:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Andrew Morton

Hi Arnaldo,

I did a diff of what I have in my trace-cmd library and found there
were a few patches that need to be brought over to tools/lib/traceevent
as well.

I have a repo based off of 4.5-rc3, but feel free to pull the patches
in directly.

-- Steve


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
traceevent/updates

Head SHA1: b5c65b951fe641c6a82667c11d617c3c26240d17


Chaos.Chen (1):
      tools lib traceevent: Fix time stamp rounding issue

Steven Rostedt (Red Hat) (3):
      tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number
      tools lib traceevent: Set int_array fields to NULL if freeing from error
      tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines

----
 tools/lib/traceevent/event-parse.c | 10 +++++++++-
 tools/lib/traceevent/event-parse.h |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH v2] tools lib traceevents: Fix output of %llu for 64 bit values read on 32 bit machines
@ 2015-11-16 22:25 Steven Rostedt
  2015-11-26  8:21 ` [tip:perf/core] tools lib traceevent: " tip-bot for Steven Rostedt
  0 siblings, 1 reply; 15+ messages in thread
From: Steven Rostedt @ 2015-11-16 22:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: LKML, Ingo Molnar, Namhyung Kim


When a long value is read on 32 bit machines for 64 bit output, the parsing
needs to change "%lu" into "%llu", as the value is read natively.

Unfortunately, if "%llu" is already there, the code will add another "l" to
it and fail to parse it properly.

Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
diff --git a/event-parse.c b/event-parse.c
index 0a30253..ee5b720 100644
--- a/event-parse.c
+++ b/event-parse.c
@@ -4828,13 +4828,12 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
 				    sizeof(long) != 8) {
 					char *p;
 
-					ls = 2;
 					/* make %l into %ll */
-					p = strchr(format, 'l');
-					if (p)
+					if (ls == 1 && (p = strchr(format, 'l')))
 						memmove(p+1, p, strlen(p)+1);
 					else if (strcmp(format, "%p") == 0)
 						strcpy(format, "0x%llx");
+					ls = 2;
 				}
 				switch (ls) {
 				case -2:

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-08-06 20:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 20:40 [PATCH 0/4] tools lib traceevent: Updates from trace-cmd Steven Rostedt
2016-02-09 20:40 ` [PATCH 1/4] tools lib traceevent: Fix time stamp rounding issue Steven Rostedt
2016-03-05  8:19   ` [tip:perf/core] " tip-bot for Chaos.Chen
2016-02-09 20:40 ` [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number Steven Rostedt
2016-03-02 12:20   ` Arnaldo Carvalho de Melo
2016-08-05 18:19     ` Steven Rostedt
2016-08-05 18:36       ` Arnaldo Carvalho de Melo
2016-08-05 19:15         ` Steven Rostedt
2016-08-05 23:02           ` Arnaldo Carvalho de Melo
2016-02-09 20:40 ` [PATCH 3/4] tools lib traceevent: Set int_array fields to NULL if freeing from error Steven Rostedt
2016-03-05  8:19   ` [tip:perf/core] " tip-bot for Steven Rostedt (Red Hat)
2016-02-09 20:40 ` [PATCH 4/4] tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines Steven Rostedt
2016-03-05  8:19   ` [tip:perf/core] " tip-bot for Steven Rostedt (Red Hat)
2016-03-01 21:47 ` [PATCH 0/4] tools lib traceevent: Updates from trace-cmd Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2015-11-16 22:25 [PATCH v2] tools lib traceevents: Fix output of %llu for 64 bit values read on 32 bit machines Steven Rostedt
2015-11-26  8:21 ` [tip:perf/core] tools lib traceevent: " tip-bot for Steven Rostedt

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.