Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf evsel: Rename perf_evsel__{prev,next}() to evsel__{prev,next}()

As those are 'struct evsel' methods, not part of tools/lib/perf/, aka
libperf, to whom the perf_ prefix belongs.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+32 -32
+1 -1
tools/perf/tests/evsel-roundtrip-name.c
··· 53 53 ret = -1; 54 54 } 55 55 56 - evsel = perf_evsel__next(evsel); 56 + evsel = evsel__next(evsel); 57 57 } 58 58 } 59 59 }
+26 -26
tools/perf/tests/parse-events.c
··· 468 468 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); 469 469 470 470 /* syscalls:sys_enter_openat:k */ 471 - evsel = perf_evsel__next(evsel); 471 + evsel = evsel__next(evsel); 472 472 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); 473 473 TEST_ASSERT_VAL("wrong sample_type", 474 474 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); ··· 479 479 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); 480 480 481 481 /* 1:1:hp */ 482 - evsel = perf_evsel__next(evsel); 482 + evsel = evsel__next(evsel); 483 483 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); 484 484 TEST_ASSERT_VAL("wrong config", 1 == evsel->core.attr.config); 485 485 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); ··· 501 501 TEST_ASSERT_VAL("wrong name", !strcmp(evsel__name(evsel), "krava")); 502 502 503 503 /* cpu/config=2/u" */ 504 - evsel = perf_evsel__next(evsel); 504 + evsel = evsel__next(evsel); 505 505 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); 506 506 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); 507 507 TEST_ASSERT_VAL("wrong config", 2 == evsel->core.attr.config); ··· 529 529 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); 530 530 531 531 /* cpu/config=2,call-graph=no,time=0,period=2000/ */ 532 - evsel = perf_evsel__next(evsel); 532 + evsel = evsel__next(evsel); 533 533 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); 534 534 TEST_ASSERT_VAL("wrong config", 2 == evsel->core.attr.config); 535 535 /* ··· 577 577 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); 578 578 579 579 /* cpu/pmu-event/u*/ 580 - evsel = perf_evsel__next(evsel); 580 + evsel = evsel__next(evsel); 581 581 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); 582 582 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); 583 583 TEST_ASSERT_VAL("wrong exclude_user", ··· 658 658 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 659 659 660 660 /* cycles:upp */ 661 - evsel = perf_evsel__next(evsel); 661 + evsel = evsel__next(evsel); 662 662 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 663 663 TEST_ASSERT_VAL("wrong config", 664 664 PERF_COUNT_HW_CPU_CYCLES == evsel->core.attr.config); ··· 700 700 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 701 701 702 702 /* cache-references + :u modifier */ 703 - evsel = perf_evsel__next(evsel); 703 + evsel = evsel__next(evsel); 704 704 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 705 705 TEST_ASSERT_VAL("wrong config", 706 706 PERF_COUNT_HW_CACHE_REFERENCES == evsel->core.attr.config); ··· 715 715 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 716 716 717 717 /* cycles:k */ 718 - evsel = perf_evsel__next(evsel); 718 + evsel = evsel__next(evsel); 719 719 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 720 720 TEST_ASSERT_VAL("wrong config", 721 721 PERF_COUNT_HW_CPU_CYCLES == evsel->core.attr.config); ··· 758 758 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 759 759 760 760 /* group1 cycles:kppp */ 761 - evsel = perf_evsel__next(evsel); 761 + evsel = evsel__next(evsel); 762 762 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 763 763 TEST_ASSERT_VAL("wrong config", 764 764 PERF_COUNT_HW_CPU_CYCLES == evsel->core.attr.config); ··· 775 775 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 776 776 777 777 /* group2 cycles + G modifier */ 778 - evsel = leader = perf_evsel__next(evsel); 778 + evsel = leader = evsel__next(evsel); 779 779 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 780 780 TEST_ASSERT_VAL("wrong config", 781 781 PERF_COUNT_HW_CPU_CYCLES == evsel->core.attr.config); ··· 793 793 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 794 794 795 795 /* group2 1:3 + G modifier */ 796 - evsel = perf_evsel__next(evsel); 796 + evsel = evsel__next(evsel); 797 797 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); 798 798 TEST_ASSERT_VAL("wrong config", 3 == evsel->core.attr.config); 799 799 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); ··· 807 807 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 808 808 809 809 /* instructions:u */ 810 - evsel = perf_evsel__next(evsel); 810 + evsel = evsel__next(evsel); 811 811 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 812 812 TEST_ASSERT_VAL("wrong config", 813 813 PERF_COUNT_HW_INSTRUCTIONS == evsel->core.attr.config); ··· 849 849 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 850 850 851 851 /* instructions:kp + p */ 852 - evsel = perf_evsel__next(evsel); 852 + evsel = evsel__next(evsel); 853 853 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 854 854 TEST_ASSERT_VAL("wrong config", 855 855 PERF_COUNT_HW_INSTRUCTIONS == evsel->core.attr.config); ··· 892 892 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 893 893 894 894 /* instructions + G */ 895 - evsel = perf_evsel__next(evsel); 895 + evsel = evsel__next(evsel); 896 896 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 897 897 TEST_ASSERT_VAL("wrong config", 898 898 PERF_COUNT_HW_INSTRUCTIONS == evsel->core.attr.config); ··· 907 907 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 908 908 909 909 /* cycles:G */ 910 - evsel = leader = perf_evsel__next(evsel); 910 + evsel = leader = evsel__next(evsel); 911 911 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 912 912 TEST_ASSERT_VAL("wrong config", 913 913 PERF_COUNT_HW_CPU_CYCLES == evsel->core.attr.config); ··· 924 924 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); 925 925 926 926 /* instructions:G */ 927 - evsel = perf_evsel__next(evsel); 927 + evsel = evsel__next(evsel); 928 928 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 929 929 TEST_ASSERT_VAL("wrong config", 930 930 PERF_COUNT_HW_INSTRUCTIONS == evsel->core.attr.config); ··· 938 938 TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 1); 939 939 940 940 /* cycles */ 941 - evsel = perf_evsel__next(evsel); 941 + evsel = evsel__next(evsel); 942 942 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 943 943 TEST_ASSERT_VAL("wrong config", 944 944 PERF_COUNT_HW_CPU_CYCLES == evsel->core.attr.config); ··· 977 977 TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0); 978 978 979 979 /* cache-misses:G + :H group modifier */ 980 - evsel = perf_evsel__next(evsel); 980 + evsel = evsel__next(evsel); 981 981 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 982 982 TEST_ASSERT_VAL("wrong config", 983 983 PERF_COUNT_HW_CACHE_MISSES == evsel->core.attr.config); ··· 1017 1017 TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0); 1018 1018 1019 1019 /* cache-misses:H + :G group modifier */ 1020 - evsel = perf_evsel__next(evsel); 1020 + evsel = evsel__next(evsel); 1021 1021 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1022 1022 TEST_ASSERT_VAL("wrong config", 1023 1023 PERF_COUNT_HW_CACHE_MISSES == evsel->core.attr.config); ··· 1057 1057 TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0); 1058 1058 1059 1059 /* cache-misses:H + :u group modifier */ 1060 - evsel = perf_evsel__next(evsel); 1060 + evsel = evsel__next(evsel); 1061 1061 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1062 1062 TEST_ASSERT_VAL("wrong config", 1063 1063 PERF_COUNT_HW_CACHE_MISSES == evsel->core.attr.config); ··· 1097 1097 TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0); 1098 1098 1099 1099 /* cache-misses:H + :uG group modifier */ 1100 - evsel = perf_evsel__next(evsel); 1100 + evsel = evsel__next(evsel); 1101 1101 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1102 1102 TEST_ASSERT_VAL("wrong config", 1103 1103 PERF_COUNT_HW_CACHE_MISSES == evsel->core.attr.config); ··· 1135 1135 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); 1136 1136 1137 1137 /* cache-misses - not sampling */ 1138 - evsel = perf_evsel__next(evsel); 1138 + evsel = evsel__next(evsel); 1139 1139 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1140 1140 TEST_ASSERT_VAL("wrong config", 1141 1141 PERF_COUNT_HW_CACHE_MISSES == evsel->core.attr.config); ··· 1149 1149 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); 1150 1150 1151 1151 /* branch-misses - not sampling */ 1152 - evsel = perf_evsel__next(evsel); 1152 + evsel = evsel__next(evsel); 1153 1153 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1154 1154 TEST_ASSERT_VAL("wrong config", 1155 1155 PERF_COUNT_HW_BRANCH_MISSES == evsel->core.attr.config); ··· 1188 1188 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); 1189 1189 1190 1190 /* branch-misses - not sampling */ 1191 - evsel = perf_evsel__next(evsel); 1191 + evsel = evsel__next(evsel); 1192 1192 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1193 1193 TEST_ASSERT_VAL("wrong config", 1194 1194 PERF_COUNT_HW_BRANCH_MISSES == evsel->core.attr.config); ··· 1234 1234 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); 1235 1235 1236 1236 /* cache-misses - can not be pinned, but will go on with the leader */ 1237 - evsel = perf_evsel__next(evsel); 1237 + evsel = evsel__next(evsel); 1238 1238 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); 1239 1239 TEST_ASSERT_VAL("wrong config", 1240 1240 PERF_COUNT_HW_CACHE_MISSES == evsel->core.attr.config); 1241 1241 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); 1242 1242 1243 1243 /* branch-misses - ditto */ 1244 - evsel = perf_evsel__next(evsel); 1244 + evsel = evsel__next(evsel); 1245 1245 TEST_ASSERT_VAL("wrong config", 1246 1246 PERF_COUNT_HW_BRANCH_MISSES == evsel->core.attr.config); 1247 1247 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned);
+2 -2
tools/perf/ui/browsers/hists.c
··· 3512 3512 if (pos->core.node.next == &evlist->core.entries) 3513 3513 pos = evlist__first(evlist); 3514 3514 else 3515 - pos = perf_evsel__next(pos); 3515 + pos = evsel__next(pos); 3516 3516 goto browse_hists; 3517 3517 case K_UNTAB: 3518 3518 if (pos->core.node.prev == &evlist->core.entries) 3519 3519 pos = evlist__last(evlist); 3520 3520 else 3521 - pos = perf_evsel__prev(pos); 3521 + pos = evsel__prev(pos); 3522 3522 goto browse_hists; 3523 3523 case K_SWITCH_INPUT_DATA: 3524 3524 case K_RELOAD:
+2 -2
tools/perf/util/evsel.h
··· 299 299 int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event, 300 300 u64 *timestamp); 301 301 302 - static inline struct evsel *perf_evsel__next(struct evsel *evsel) 302 + static inline struct evsel *evsel__next(struct evsel *evsel) 303 303 { 304 304 return list_entry(evsel->core.node.next, struct evsel, core.node); 305 305 } 306 306 307 - static inline struct evsel *perf_evsel__prev(struct evsel *evsel) 307 + static inline struct evsel *evsel__prev(struct evsel *evsel) 308 308 { 309 309 return list_entry(evsel->core.node.prev, struct evsel, core.node); 310 310 }
+1 -1
tools/perf/util/sort.c
··· 2354 2354 2355 2355 evsel = evlist__first(evlist); 2356 2356 while (--nr > 0) 2357 - evsel = perf_evsel__next(evsel); 2357 + evsel = evsel__next(evsel); 2358 2358 2359 2359 return evsel; 2360 2360 }