Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.maps/map_hash_interprocess.stp

raw
1 # This test makes sure that interprocess hashing works, especially for stapdyn,
2 # so for example the stap_hash_seed must be correctly shared.
3
4 global key1 = "foo"
5 global key2 = 42
6 global value = 0x123456789ABCDEF
7
8 global array
9
10 # The array write occurs in the target context
11 probe process.begin {
12 array[key1, key2] = value
13 }
14
15 # The array read occurs in neutral context (stapio/stapdyn).
16 # It's also keyed manually, because 'foreach' doesn't exercise hashing.
17 probe end {
18 printf("array[\"%s\", %d]: %#x\n",
19 key1, key2, array[key1, key2])
20 }