Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304856
b: refs/heads/master
c: fb29fa5
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Apr 25, 2012
1 parent 16d9a4f commit 4aca0a2
Show file tree
Hide file tree
Showing 3 changed files with 13 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: 44d1a3edfbd65f9da6725921e2425b10477772d8
refs/heads/master: fb29fa58e36df09c807d252247d64a221fcd5bbb
9 changes: 6 additions & 3 deletions trunk/tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ static int jump__parse(struct ins_operands *ops)
{
const char *s = strchr(ops->raw, '+');

if (s++ == NULL)
return -1;
ops->target.addr = strtoll(ops->raw, NULL, 16);

if (s++ != NULL)
ops->target.offset = strtoll(s, NULL, 16);
else
ops->target.offset = UINT64_MAX;

ops->target.offset = strtoll(s, NULL, 16);
return 0;
}

Expand Down
6 changes: 6 additions & 0 deletions trunk/tools/perf/util/annotate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define __PERF_ANNOTATE_H

#include <stdbool.h>
#include <stdint.h>
#include "types.h"
#include "symbol.h"
#include <linux/list.h>
Expand Down Expand Up @@ -41,6 +42,11 @@ struct disasm_line {
struct ins_operands ops;
};

static inline bool disasm_line__has_offset(const struct disasm_line *dl)
{
return dl->ops.target.offset != UINT64_MAX;
}

void disasm_line__free(struct disasm_line *dl);
struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos);
size_t disasm__fprintf(struct list_head *head, FILE *fp);
Expand Down

0 comments on commit 4aca0a2

Please sign in to comment.