Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323702
b: refs/heads/master
c: f4d8343
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter authored and Arnaldo Carvalho de Melo committed Aug 17, 2012
1 parent 258f534 commit 2ef1533
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 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: 0985a94891c73740dea1e2697f9d598a4a7810ab
refs/heads/master: f4d834367cda98eee3769638da6ad687607c74e6
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/evsel.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct perf_evsel {
u64 *id;
struct perf_counts *counts;
int idx;
int ids;
u32 ids;
struct hists hists;
char *name;
struct event_format *tp_format;
Expand Down
11 changes: 7 additions & 4 deletions trunk/tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ int perf_session__read_header(struct perf_session *session, int fd)
}

int perf_event__synthesize_attr(struct perf_tool *tool,
struct perf_event_attr *attr, u16 ids, u64 *id,
struct perf_event_attr *attr, u32 ids, u64 *id,
perf_event__handler_t process)
{
union perf_event *ev;
Expand All @@ -2261,9 +2261,12 @@ int perf_event__synthesize_attr(struct perf_tool *tool,
memcpy(ev->attr.id, id, ids * sizeof(u64));

ev->attr.header.type = PERF_RECORD_HEADER_ATTR;
ev->attr.header.size = size;
ev->attr.header.size = (u16)size;

err = process(tool, ev, NULL, NULL);
if (ev->attr.header.size == size)
err = process(tool, ev, NULL, NULL);
else
err = -E2BIG;

free(ev);

Expand Down Expand Up @@ -2292,7 +2295,7 @@ int perf_event__synthesize_attrs(struct perf_tool *tool,
int perf_event__process_attr(union perf_event *event,
struct perf_evlist **pevlist)
{
unsigned int i, ids, n_ids;
u32 i, ids, n_ids;
struct perf_evsel *evsel;
struct perf_evlist *evlist = *pevlist;

Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir);

int perf_event__synthesize_attr(struct perf_tool *tool,
struct perf_event_attr *attr, u16 ids, u64 *id,
struct perf_event_attr *attr, u32 ids, u64 *id,
perf_event__handler_t process);
int perf_event__synthesize_attrs(struct perf_tool *tool,
struct perf_session *session,
Expand Down

0 comments on commit 2ef1533

Please sign in to comment.