~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to tools/perf/util/evsel.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
                off_t           id_offset;
75
75
        };
76
76
        struct cgroup_sel       *cgrp;
77
 
        struct {
78
 
                void            *func;
79
 
                void            *data;
80
 
        } handler;
 
77
        void                    *handler;
81
78
        struct cpu_map          *cpus;
82
79
        unsigned int            sample_size;
83
80
        int                     id_pos;
99
96
struct perf_evlist;
100
97
struct perf_record_opts;
101
98
 
102
 
struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx);
103
 
struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name, int idx);
 
99
struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);
 
100
 
 
101
static inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr)
 
102
{
 
103
        return perf_evsel__new_idx(attr, 0);
 
104
}
 
105
 
 
106
struct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx);
 
107
 
 
108
static inline struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name)
 
109
{
 
110
        return perf_evsel__newtp_idx(sys, name, 0);
 
111
}
104
112
 
105
113
struct event_format *event_format__new(const char *sys, const char *name);
106
114
 
197
205
               (e1->attr.config == e2->attr.config);
198
206
}
199
207
 
 
208
#define perf_evsel__cmp(a, b)                   \
 
209
        ((a) &&                                 \
 
210
         (b) &&                                 \
 
211
         (a)->attr.type == (b)->attr.type &&    \
 
212
         (a)->attr.config == (b)->attr.config)
 
213
 
200
214
int __perf_evsel__read_on_cpu(struct perf_evsel *evsel,
201
215
                              int cpu, int thread, bool scale);
202
216
 
265
279
        return list_entry(evsel->node.next, struct perf_evsel, node);
266
280
}
267
281
 
 
282
static inline struct perf_evsel *perf_evsel__prev(struct perf_evsel *evsel)
 
283
{
 
284
        return list_entry(evsel->node.prev, struct perf_evsel, node);
 
285
}
 
286
 
268
287
/**
269
288
 * perf_evsel__is_group_leader - Return whether given evsel is a leader event
270
289
 *
304
323
 
305
324
bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
306
325
                          char *msg, size_t msgsize);
307
 
int perf_evsel__open_strerror(struct perf_evsel *evsel,
308
 
                              struct perf_target *target,
 
326
int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
309
327
                              int err, char *msg, size_t size);
310
328
 
311
329
static inline int perf_evsel__group_idx(struct perf_evsel *evsel)