linux-stable/tools
Ian Rogers d0313e629f perf jevents: Fold strings optimization
If a shorter string ends a longer string then the shorter string may
reuse the longer string at an offset. For example, on x86 the event
arith.cycles_div_busy and cycles_div_busy can be folded, even though
they have difference names the strings are identical after 6
characters. cycles_div_busy can reuse the arith.cycles_div_busy string
at an offset of 6.

In pmu-events.c this looks like the following where the 'also:' lists
folded strings:

/* offset=177541 */ "arith.cycles_div_busy\000\000pipeline\000Cycles the divider is busy\000\000\000event=0x14,period=2000000,umask=0x1\000\000\000\000\000\000\000\000\000" /* also: cycles_div_busy\000\000pipeline\000Cycles the divider is busy\000\000\000event=0x14,period=2000000,umask=0x1\000\000\000\000\000\000\000\000\000 */

As jevents.py combines multiple strings for an event into a larger
string, the amount of folding is minimal as all parts of the event must
align. Other organizations can benefit more from folding, but lose space
by say recording more offsets.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Will Deacon <will@kernel.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-15-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-08-13 15:03:09 -03:00
..
accounting
arch perf tools changes for v6.0: 1st batch 2022-08-06 09:36:08 -07:00
bootconfig
bpf bpftool: Complete libbfd feature detection 2022-08-10 10:44:01 -03:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-10 10:44:02 -03:00
certs
cgroup tools: add memcg_shrinker.py 2022-07-03 18:08:40 -07:00
counter
debugging
edid
firewire
firmware
gpio
hv
iio
include perf tools: Sync addition of PERF_MEM_SNOOPX_PEER 2022-08-11 19:11:36 -03:00
io_uring
kvm/kvm_stat
laptop
leds
lib Bitmap patches for v6.0-rc1 2022-08-07 17:52:35 -07:00
memory-model
objtool This was a moderately busy cycle for documentation, but nothing all that 2022-08-02 19:24:24 -07:00
pci
pcmcia
perf perf jevents: Fold strings optimization 2022-08-13 15:03:09 -03:00
power platform-drivers-x86 for v6.0-1 2022-08-04 18:19:14 -07:00
rcu
scripts
spi
testing Updates to various subsystems which I help look after. lib, ocfs2, 2022-08-07 10:03:24 -07:00
thermal tools/thermal: Fix possible path truncations 2022-08-03 19:28:46 +02:00
time
tracing rtla: Define syscall numbers for riscv 2022-07-31 17:04:05 -04:00
usb tools: usb: testusb: Add super-plus speed reporting 2022-07-08 14:54:49 +02:00
verification rv/monitor: Add the wwnr monitor 2022-07-30 14:01:30 -04:00
virtio
vm - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
wmi
Makefile