]> sourceware.org Git - systemtap.git/commit
stapbpf PR23478:: Initial support to allow use of multi-dimensional arrays.
authorWilliam Cohen <wcohen@redhat.com>
Tue, 20 Aug 2019 20:18:41 +0000 (16:18 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Tue, 1 Oct 2019 12:46:13 +0000 (08:46 -0400)
commit57891026a817ca848ff4d96f43ea7dc93dd03aea
treeffb4f1d606f2a1cdd0e2f374bf5b9f0d850dce29
parent35e23ac554b953b84d0259942ea95acf6fbc75ed
stapbpf PR23478:: Initial support to allow use of multi-dimensional arrays.

The patch allows multi-dimensional arrays to be used lhs and rhs
expression.  It also allows deletion and check of existence of
particular elements with multi-dimensional key values.  However, this
patch does not support foreach statements with multi-dimensional
arrays.  Now something like the following trivial example works with
the bpf backend:

 sudo ../install/bin/stap --bpf   -v -e 'global x; probe begin{ x[4,2] = 2; x[2,4]= -2; exit()} probe end{ printf("%d ", x[4,2]); printf("%d ", x[3,3]); printf("%d ", x[2,4])}'
Pass 1: parsed user script and 51 library scripts using 250084virt/23932res/9000shr/14756data kb, in 10usr/0sys/15real ms.
Pass 2: analyzed script: 2 probes, 3 functions, 0 embeds, 1 global using 250084virt/23932res/9000shr/14756data kb, in 0usr/0sys/0real ms.
Pass 3: pass skipped for stapbpf runtime in 0usr/0sys/0real ms.
Pass 4: compiled BPF into "stap_29813.bo" in 0usr/0sys/0real ms.
Pass 5: starting run.
2 0 -2 Pass 5: run completed in 0usr/0sys/3real ms.
bpf-translate.cxx
This page took 0.025213 seconds and 5 git commands to generate.