struct xyarray *fd;
struct xyarray *sample_id;
u64 *id;
+ u32 ids;
/* parse modifier helper */
int nr_members;
int cpu, int thread, u64 id)
{
perf_evlist__id_hash(evlist, evsel, cpu, thread, id);
- evsel->core.id[evsel->ids++] = id;
+ evsel->core.id[evsel->core.ids++] = id;
}
int perf_evlist__id_add_fd(struct evlist *evlist,
xyarray__delete(evsel->core.sample_id);
evsel->core.sample_id = NULL;
zfree(&evsel->core.id);
- evsel->ids = 0;
+ evsel->core.ids = 0;
}
static void perf_evsel__free_config_terms(struct evsel *evsel)
struct perf_counts *counts;
struct perf_counts *prev_raw_counts;
int idx;
- u32 ids;
unsigned long max_events;
unsigned long nr_events_printed;
char *name;
* copy into an nri to be independent of the
* type of ids,
*/
- nri = evsel->ids;
+ nri = evsel->core.ids;
ret = do_write(ff, &nri, sizeof(nri));
if (ret < 0)
return ret;
/*
* write unique ids for this event
*/
- ret = do_write(ff, evsel->core.id, evsel->ids * sizeof(u64));
+ ret = do_write(ff, evsel->core.id, evsel->core.ids * sizeof(u64));
if (ret < 0)
return ret;
}
id = calloc(nr, sizeof(*id));
if (!id)
goto error;
- evsel->ids = nr;
+ evsel->core.ids = nr;
evsel->core.id = id;
for (j = 0 ; j < nr; j++) {
for (evsel = events; evsel->core.attr.size; evsel++) {
fprintf(fp, "# event : name = %s, ", evsel->name);
- if (evsel->ids) {
+ if (evsel->core.ids) {
fprintf(fp, ", id = {");
- for (j = 0, id = evsel->core.id; j < evsel->ids; j++, id++) {
+ for (j = 0, id = evsel->core.id; j < evsel->core.ids; j++, id++) {
if (j)
fputc(',', fp);
fprintf(fp, " %"PRIu64, *id);
evlist__for_each_entry(session->evlist, evsel) {
evsel->id_offset = lseek(fd, 0, SEEK_CUR);
- err = do_write(&ff, evsel->core.id, evsel->ids * sizeof(u64));
+ err = do_write(&ff, evsel->core.id, evsel->core.ids * sizeof(u64));
if (err < 0) {
pr_debug("failed to write perf header\n");
return err;
.attr = evsel->core.attr,
.ids = {
.offset = evsel->id_offset,
- .size = evsel->ids * sizeof(u64),
+ .size = evsel->core.ids * sizeof(u64),
}
};
err = do_write(&ff, &f_attr, sizeof(f_attr));
int err;
evlist__for_each_entry(evlist, evsel) {
- if (evsel->core.attr.type == bts->pmu_type && evsel->ids) {
+ if (evsel->core.attr.type == bts->pmu_type && evsel->core.ids) {
found = true;
break;
}
struct evsel *evsel;
evlist__for_each_entry(evlist, evsel) {
- if (evsel->core.attr.type == pt->pmu_type && evsel->ids)
+ if (evsel->core.attr.type == pt->pmu_type && evsel->core.ids)
return evsel;
}
sizeof(struct id_index_entry);
evlist__for_each_entry(evlist, evsel)
- nr += evsel->ids;
+ nr += evsel->core.ids;
n = nr > max_nr ? max_nr : nr;
sz = sizeof(struct perf_record_id_index) + n * sizeof(struct id_index_entry);
evlist__for_each_entry(evlist, evsel) {
u32 j;
- for (j = 0; j < evsel->ids; j++) {
+ for (j = 0; j < evsel->core.ids; j++) {
struct id_index_entry *e;
struct perf_sample_id *sid;
int err = 0;
evlist__for_each_entry(evlist, evsel) {
- err = perf_event__synthesize_attr(tool, &evsel->core.attr, evsel->ids,
+ err = perf_event__synthesize_attr(tool, &evsel->core.attr, evsel->core.ids,
evsel->core.id, process);
if (err) {
pr_debug("failed to create perf header attribute\n");