linux-next/tools/perf
Ian Rogers 233157785a perf python: Correctly throw IndexError
Correctly throw IndexError for out-of-bound accesses to evlist:

  Python 3.11.9 (main, Jun 19 2024, 00:38:48) [GCC 13.2.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.path.insert(0, '/tmp/perf/python')
  >>> import perf
  >>> x=perf.parse_events('cycles')
  >>> print(x)
  evlist([cycles])
  >>> x[2]
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  IndexError: Index out of range

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Veronika Molnarova <vmolnaro@redhat.com>
Cc: Weilin Wang <weilin.wang@intel.com>
Link: https://lore.kernel.org/r/20241119011644.971342-23-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-12-18 16:24:33 -03:00
..
arch perf x86: Define arch_fetch_insn in NO_AUXTRACE builds 2024-12-18 16:24:33 -03:00
bench perf bench: Remove reference to cmd_inject 2024-12-18 16:24:33 -03:00
check-header_ignore_hunks/lib perf tools: update expected diff for lib/list_sort.c 2024-11-05 17:12:33 -08:00
dlfilters perf tools: Simplify evsel__add_modifier() 2024-10-22 09:52:11 -07:00
Documentation perf intel-pt: Add documentation for pause / resume 2024-12-18 16:24:32 -03:00
include/perf perf dlfilter: Add al_cleanup() 2023-08-15 16:41:49 -03:00
jvmti
pmu-events perf vendor events arm64: Update N2/V2 events from source 2024-12-12 15:41:27 -03:00
python
scripts perf script: Move script_fetch_insn to trace-event-scripting.c 2024-12-18 16:24:32 -03:00
tests perf stat: Move stat_config into config.c 2024-12-18 16:24:32 -03:00
trace perf env: Move arch errno function to only use in env 2024-12-18 16:24:33 -03:00
ui perf script: Move find_scripts to browser/scripts.c 2024-12-18 16:24:32 -03:00
util perf python: Correctly throw IndexError 2024-12-18 16:24:33 -03:00
.gitignore perf tools: Add the empty-pmu-events build to .gitignore 2024-11-07 10:51:56 -08:00
Build perf check: Introduce 'check' subcommand 2024-09-04 09:56:05 -03:00
builtin-annotate.c perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS 2024-12-09 17:52:41 -03:00
builtin-bench.c perf bench uprobe: Add uretprobe variant of uprobe benchmarks 2024-04-12 17:54:02 -03:00
builtin-buildid-cache.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-buildid-list.c perf buildid-list: Use perf_tool__init 2024-08-12 18:07:10 -03:00
builtin-c2c.c perf mem: Fix missed p-core mem events on ADL and RPL 2024-09-06 11:45:17 -03:00
builtin-check.c perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT 2024-10-18 10:17:40 -07:00
builtin-config.c perf path: Make mkpath thread safe, remove 16384 bytes from .bss 2023-05-28 10:24:14 -03:00
builtin-daemon.c perf daemon: Fix the build on more 32-bit architectures 2024-08-19 21:44:30 -03:00
builtin-data.c perf util: Move input_name to util 2023-04-10 19:21:31 -03:00
builtin-diff.c perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS 2024-12-09 17:52:41 -03:00
builtin-evlist.c perf evlist: Print hint for group 2024-09-11 13:08:45 -03:00
builtin-ftrace.c Merge remote-tracking branch 'torvalds/master' into perf-tools-next 2024-12-13 11:53:27 -03:00
builtin-help.c perf help: Fix a typo ("bellow") 2024-09-11 11:24:12 -03:00
builtin-inject.c perf callchain: Allow symbols to be optional when resolving a callchain 2024-09-10 17:32:47 -03:00
builtin-kallsyms.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-kmem.c perf evsel: Add/use accessor for tp_format 2024-12-09 17:52:42 -03:00
builtin-kvm.c perf kvm: Move functions used in util out of builtin 2024-12-18 16:24:32 -03:00
builtin-kwork.c perf kwork: Make perf_kwork_add_work a callback 2024-12-18 16:24:33 -03:00
builtin-list.c perf list: Fix topic and pmu_name argument order 2024-11-13 16:27:35 -03:00
builtin-lock.c perf lock: Move common lock contention code to new file 2024-12-18 16:24:33 -03:00
builtin-mem.c perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS 2024-12-09 17:52:41 -03:00
builtin-probe.c perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT 2024-10-18 10:17:40 -07:00
builtin-record.c perf tools: Parse aux-action 2024-12-18 16:24:32 -03:00
builtin-report.c perf build: Include libtraceevent headers directly indicated by pkg-config 2024-11-08 22:42:57 -08:00
builtin-sched.c perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS 2024-12-09 17:52:41 -03:00
builtin-script.c perf script: Move perf_sample__sprintf_flags to trace-event-scripting.c 2024-12-18 16:24:33 -03:00
builtin-stat.c perf stat: Move stat_config into config.c 2024-12-18 16:24:32 -03:00
builtin-timechart.c perf timechart: Remove redundant variable assignment 2024-11-13 16:27:35 -03:00
builtin-top.c perf map: API clean up 2024-08-19 14:49:53 -03:00
builtin-trace.c perf env: Move arch errno function to only use in env 2024-12-18 16:24:33 -03:00
builtin-version.c perf version: Update --build-options to use 'supported_features' array 2024-09-04 16:19:29 -03:00
builtin.h perf script: Move find_scripts to browser/scripts.c 2024-12-18 16:24:32 -03:00
check-headers.sh tools headers: Update the linux/unaligned.h copy with the kernel sources 2024-10-28 12:34:28 -03:00
command-list.txt perf help: Use HAVE_LIBTRACEEVENT to filter out unsupported commands 2023-01-02 11:51:53 -03:00
CREDITS
design.txt
Makefile perf tools: Fix wrong message when running "make JOBS=1" 2024-08-01 12:11:33 -03:00
Makefile.config perf build: Minor improvement for linking libzstd 2024-12-18 16:24:32 -03:00
Makefile.perf perf build: Remove test library from python shared object 2024-12-18 16:24:33 -03:00
MANIFEST tools perf: Add arm64 sysreg files to MANIFEST 2023-11-22 11:17:53 -08:00
perf-archive.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-completion.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf test: Remove C test wrapper for attr.py 2024-10-17 13:17:36 -07:00
perf.h perf: Increase MAX_NR_CPUS to 4096 2024-12-09 17:52:41 -03:00