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
..
2024-12-18 16:24:32 -03:00
2024-12-18 16:24:32 -03:00
2022-06-28 12:05:25 -03:00
2023-03-14 08:29:46 -03:00
2024-07-03 14:59:15 -07:00
2024-10-14 10:45:28 -07:00
2021-04-29 10:30:58 -03:00
2024-03-21 10:41:28 -03:00
2021-08-11 09:35:44 -03:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-08-12 18:07:10 -03:00
2024-11-07 10:51:56 -08:00
2024-11-07 10:51:56 -08:00
2024-12-18 16:24:33 -03:00
2024-12-18 16:24:33 -03:00
2023-01-23 10:00:47 -03:00
2024-08-12 18:05:14 -03:00
2024-08-19 14:51:46 -03:00
2024-08-19 14:51:46 -03:00
2024-02-12 12:35:41 -08:00
2024-08-01 18:55:55 -03:00
2024-12-18 16:24:32 -03:00
2023-04-06 21:40:28 -03:00
2023-09-12 17:47:00 -03:00
2024-11-09 08:28:03 -08:00
2023-11-09 13:47:50 -03:00
2024-09-26 13:26:11 -07:00
2020-10-14 13:34:26 -03:00
2024-12-12 15:53:36 -03:00
2024-10-14 10:45:28 -07:00
2023-04-10 19:20:53 -03:00
2024-09-27 15:38:52 -03:00