Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169502
b: refs/heads/master
c: ffa1895
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 15, 2009
1 parent e1c97ff commit cd70162
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07a4bdddcf2546ccfbfb3c782deab636c371edeb
refs/heads/master: ffa1895561645103d8f8059b35d9c06e6eeead2e
15 changes: 7 additions & 8 deletions trunk/tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,16 @@ void parse_ftrace_printk(char *file, unsigned int size __unused)
char *line;
char *next = NULL;
char *addr_str;
int ret;
char *fmt;
int i;

line = strtok_r(file, "\n", &next);
while (line) {
item = malloc_or_die(sizeof(*item));
ret = sscanf(line, "%as : %as",
(float *)(void *)&addr_str, /* workaround gcc warning */
(float *)(void *)&item->printk);
addr_str = strtok_r(line, ":", &fmt);
item->addr = strtoull(addr_str, NULL, 16);
free(addr_str);

/* fmt still has a space, skip it */
item->printk = strdup(fmt+1);
item->next = list;
list = item;
line = strtok_r(NULL, "\n", &next);
Expand Down Expand Up @@ -2274,8 +2272,9 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc
case 'u':
case 'x':
case 'i':
bptr = (void *)(((unsigned long)bptr + (long_size - 1)) &
~(long_size - 1));
/* the pointers are always 4 bytes aligned */
bptr = (void *)(((unsigned long)bptr + 3) &
~3);
switch (ls) {
case 0:
case 1:
Expand Down

0 comments on commit cd70162

Please sign in to comment.