Skip to content

Commit a583053

Browse files
olsajiriacmel
authored andcommitted
perf tools: Rename 'struct perf_mmap' to 'struct mmap'
Rename 'struct perf_evlist' to 'struct evlist', so we don't have a name clash when we add 'struct perf_mmap' to libperf. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lore.kernel.org/lkml/20190913132355.21634-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 058bd85 commit a583053

22 files changed

Lines changed: 93 additions & 93 deletions

‎tools/perf/arch/x86/tests/perf-time-to-tsc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
6565
union perf_event *event;
6666
u64 test_tsc, comm1_tsc, comm2_tsc;
6767
u64 test_time, comm1_time = 0, comm2_time = 0;
68-
struct perf_mmap *md;
68+
struct mmap *md;
6969

7070
threads = thread_map__new(-1, getpid(), UINT_MAX);
7171
CHECK_NOT_NULL__(threads);

‎tools/perf/builtin-kvm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
750750
{
751751
struct evlist *evlist = kvm->evlist;
752752
union perf_event *event;
753-
struct perf_mmap *md;
753+
struct mmap *md;
754754
u64 timestamp;
755755
s64 n = 0;
756756
int err;

‎tools/perf/builtin-record.c‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static bool switch_output_time(struct record *rec)
119119
trigger_is_ready(&switch_output_trigger);
120120
}
121121

122-
static int record__write(struct record *rec, struct perf_mmap *map __maybe_unused,
122+
static int record__write(struct record *rec, struct mmap *map __maybe_unused,
123123
void *bf, size_t size)
124124
{
125125
struct perf_data_file *file = &rec->session->data->file;
@@ -168,7 +168,7 @@ static int record__aio_write(struct aiocb *cblock, int trace_fd,
168168
return rc;
169169
}
170170

171-
static int record__aio_complete(struct perf_mmap *md, struct aiocb *cblock)
171+
static int record__aio_complete(struct mmap *md, struct aiocb *cblock)
172172
{
173173
void *rem_buf;
174174
off_t rem_off;
@@ -214,7 +214,7 @@ static int record__aio_complete(struct perf_mmap *md, struct aiocb *cblock)
214214
return rc;
215215
}
216216

217-
static int record__aio_sync(struct perf_mmap *md, bool sync_all)
217+
static int record__aio_sync(struct mmap *md, bool sync_all)
218218
{
219219
struct aiocb **aiocb = md->aio.aiocb;
220220
struct aiocb *cblocks = md->aio.cblocks;
@@ -255,7 +255,7 @@ struct record_aio {
255255
size_t size;
256256
};
257257

258-
static int record__aio_pushfn(struct perf_mmap *map, void *to, void *buf, size_t size)
258+
static int record__aio_pushfn(struct mmap *map, void *to, void *buf, size_t size)
259259
{
260260
struct record_aio *aio = to;
261261

@@ -300,7 +300,7 @@ static int record__aio_pushfn(struct perf_mmap *map, void *to, void *buf, size_t
300300
return size;
301301
}
302302

303-
static int record__aio_push(struct record *rec, struct perf_mmap *map, off_t *off)
303+
static int record__aio_push(struct record *rec, struct mmap *map, off_t *off)
304304
{
305305
int ret, idx;
306306
int trace_fd = rec->session->data->file.fd;
@@ -351,13 +351,13 @@ static void record__aio_mmap_read_sync(struct record *rec)
351351
{
352352
int i;
353353
struct evlist *evlist = rec->evlist;
354-
struct perf_mmap *maps = evlist->mmap;
354+
struct mmap *maps = evlist->mmap;
355355

356356
if (!record__aio_enabled(rec))
357357
return;
358358

359359
for (i = 0; i < evlist->nr_mmaps; i++) {
360-
struct perf_mmap *map = &maps[i];
360+
struct mmap *map = &maps[i];
361361

362362
if (map->base)
363363
record__aio_sync(map, true);
@@ -387,7 +387,7 @@ static int record__aio_parse(const struct option *opt,
387387
#else /* HAVE_AIO_SUPPORT */
388388
static int nr_cblocks_max = 0;
389389

390-
static int record__aio_push(struct record *rec __maybe_unused, struct perf_mmap *map __maybe_unused,
390+
static int record__aio_push(struct record *rec __maybe_unused, struct mmap *map __maybe_unused,
391391
off_t *off __maybe_unused)
392392
{
393393
return -1;
@@ -482,7 +482,7 @@ static int process_synthesized_event(struct perf_tool *tool,
482482
return record__write(rec, NULL, event, event->header.size);
483483
}
484484

485-
static int record__pushfn(struct perf_mmap *map, void *to, void *bf, size_t size)
485+
static int record__pushfn(struct mmap *map, void *to, void *bf, size_t size)
486486
{
487487
struct record *rec = to;
488488

@@ -527,7 +527,7 @@ static void record__sig_exit(void)
527527
#ifdef HAVE_AUXTRACE_SUPPORT
528528

529529
static int record__process_auxtrace(struct perf_tool *tool,
530-
struct perf_mmap *map,
530+
struct mmap *map,
531531
union perf_event *event, void *data1,
532532
size_t len1, void *data2, size_t len2)
533533
{
@@ -565,7 +565,7 @@ static int record__process_auxtrace(struct perf_tool *tool,
565565
}
566566

567567
static int record__auxtrace_mmap_read(struct record *rec,
568-
struct perf_mmap *map)
568+
struct mmap *map)
569569
{
570570
int ret;
571571

@@ -581,7 +581,7 @@ static int record__auxtrace_mmap_read(struct record *rec,
581581
}
582582

583583
static int record__auxtrace_mmap_read_snapshot(struct record *rec,
584-
struct perf_mmap *map)
584+
struct mmap *map)
585585
{
586586
int ret;
587587

@@ -603,7 +603,7 @@ static int record__auxtrace_read_snapshot_all(struct record *rec)
603603
int rc = 0;
604604

605605
for (i = 0; i < rec->evlist->nr_mmaps; i++) {
606-
struct perf_mmap *map = &rec->evlist->mmap[i];
606+
struct mmap *map = &rec->evlist->mmap[i];
607607

608608
if (!map->auxtrace_mmap.base)
609609
continue;
@@ -668,7 +668,7 @@ static int record__auxtrace_init(struct record *rec)
668668

669669
static inline
670670
int record__auxtrace_mmap_read(struct record *rec __maybe_unused,
671-
struct perf_mmap *map __maybe_unused)
671+
struct mmap *map __maybe_unused)
672672
{
673673
return 0;
674674
}
@@ -901,7 +901,7 @@ static struct perf_event_header finished_round_event = {
901901
.type = PERF_RECORD_FINISHED_ROUND,
902902
};
903903

904-
static void record__adjust_affinity(struct record *rec, struct perf_mmap *map)
904+
static void record__adjust_affinity(struct record *rec, struct mmap *map)
905905
{
906906
if (rec->opts.affinity != PERF_AFFINITY_SYS &&
907907
!CPU_EQUAL(&rec->affinity_mask, &map->affinity_mask)) {
@@ -948,7 +948,7 @@ static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist,
948948
u64 bytes_written = rec->bytes_written;
949949
int i;
950950
int rc = 0;
951-
struct perf_mmap *maps;
951+
struct mmap *maps;
952952
int trace_fd = rec->data.file.fd;
953953
off_t off = 0;
954954

@@ -967,7 +967,7 @@ static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist,
967967

968968
for (i = 0; i < evlist->nr_mmaps; i++) {
969969
u64 flush = 0;
970-
struct perf_mmap *map = &maps[i];
970+
struct mmap *map = &maps[i];
971971

972972
if (map->base) {
973973
record__adjust_affinity(rec, map);

‎tools/perf/builtin-top.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
863863
{
864864
struct record_opts *opts = &top->record_opts;
865865
struct evlist *evlist = top->evlist;
866-
struct perf_mmap *md;
866+
struct mmap *md;
867867
union perf_event *event;
868868

869869
md = opts->overwrite ? &evlist->overwrite_mmap[idx] : &evlist->mmap[idx];

‎tools/perf/builtin-trace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
34443444

34453445
for (i = 0; i < evlist->nr_mmaps; i++) {
34463446
union perf_event *event;
3447-
struct perf_mmap *md;
3447+
struct mmap *md;
34483448

34493449
md = &evlist->mmap[i];
34503450
if (perf_mmap__read_init(md) < 0)

‎tools/perf/tests/backward-ring-buffer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static int count_samples(struct evlist *evlist, int *sample_count,
3333
int i;
3434

3535
for (i = 0; i < evlist->nr_mmaps; i++) {
36-
struct perf_mmap *map = &evlist->overwrite_mmap[i];
36+
struct mmap *map = &evlist->overwrite_mmap[i];
3737
union perf_event *event;
3838

3939
perf_mmap__read_init(map);

‎tools/perf/tests/bpf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
180180

181181
for (i = 0; i < evlist->nr_mmaps; i++) {
182182
union perf_event *event;
183-
struct perf_mmap *md;
183+
struct mmap *md;
184184

185185
md = &evlist->mmap[i];
186186
if (perf_mmap__read_init(md) < 0)

‎tools/perf/tests/code-reading.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static int process_events(struct machine *machine, struct evlist *evlist,
419419
struct state *state)
420420
{
421421
union perf_event *event;
422-
struct perf_mmap *md;
422+
struct mmap *md;
423423
int i, ret;
424424

425425
for (i = 0; i < evlist->nr_mmaps; i++) {

‎tools/perf/tests/keep-tracking.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
static int find_comm(struct evlist *evlist, const char *comm)
3232
{
3333
union perf_event *event;
34-
struct perf_mmap *md;
34+
struct mmap *md;
3535
int i, found;
3636

3737
found = 0;

‎tools/perf/tests/mmap-basic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
4242
expected_nr_events[nsyscalls], i, j;
4343
struct evsel *evsels[nsyscalls], *evsel;
4444
char sbuf[STRERR_BUFSIZE];
45-
struct perf_mmap *md;
45+
struct mmap *md;
4646

4747
threads = thread_map__new(-1, getpid(), UINT_MAX);
4848
if (threads == NULL) {

0 commit comments

Comments
 (0)