Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169814
b: refs/heads/master
c: 52a11f3
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Nov 27, 2009
1 parent d9d9e47 commit 3483174
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 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: 3d9b2e1ddf42dd3df38af7794fa5e39cce760f3b
refs/heads/master: 52a11f354970e7301e1d1a029b87535be45abec9
12 changes: 9 additions & 3 deletions trunk/kernel/trace/trace_kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ static int probe_arg_string(char *buf, size_t n, struct fetch_func *ff)
ret = snprintf(buf, n, "@0x%p", ff->data);
else if (ff->func == fetch_symbol) {
struct symbol_cache *sc = ff->data;
ret = snprintf(buf, n, "@%s%+ld", sc->symbol, sc->offset);
if (sc->offset)
ret = snprintf(buf, n, "@%s%+ld", sc->symbol,
sc->offset);
else
ret = snprintf(buf, n, "@%s", sc->symbol);
} else if (ff->func == fetch_retvalue)
ret = snprintf(buf, n, "$retval");
else if (ff->func == fetch_stack_address)
Expand Down Expand Up @@ -762,10 +766,12 @@ static int probes_seq_show(struct seq_file *m, void *v)
seq_printf(m, "%c", probe_is_return(tp) ? 'r' : 'p');
seq_printf(m, ":%s/%s", tp->call.system, tp->call.name);

if (tp->symbol)
if (!tp->symbol)
seq_printf(m, " 0x%p", tp->rp.kp.addr);
else if (tp->rp.kp.offset)
seq_printf(m, " %s+%u", probe_symbol(tp), tp->rp.kp.offset);
else
seq_printf(m, " 0x%p", tp->rp.kp.addr);
seq_printf(m, " %s", probe_symbol(tp));

for (i = 0; i < tp->nr_args; i++) {
ret = probe_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i].fetch);
Expand Down

0 comments on commit 3483174

Please sign in to comment.