]> sourceware.org Git - systemtap.git/commit
PR23875 :: support string map keys in foreach iteration
authorSerhei Makarov <smakarov@redhat.com>
Tue, 26 Mar 2019 17:05:26 +0000 (13:05 -0400)
committerSerhei Makarov <smakarov@redhat.com>
Tue, 26 Mar 2019 17:12:38 +0000 (13:12 -0400)
commitceed4889a27a1584cd4e63d4211d1f68ee6ee145
tree9c2ac5a55b280aa8dee086518791a21c2c6c65eb
parent35ae777d44e05af344d0c7fa701fa8f3b64c62d0
PR23875 :: support string map keys in foreach iteration

* bpf-translate.cxx (bpf_unparser::visit_foreach_loop): Add code to handle
and correctly allocate space for string map keys.
* bpf-interp.cxx (as_ptr): New overload yielding void * from char *,
to return cached string map keys into bpf registers.
(typedef map_int_keys): Renamed from map_keys, only handles caching integer keys.
(typedef map_str_keys): New typedef, handled caching string keys.
(struct map_keys): New struct (XXX pseudo-union) for either int or str key iteration.
(map_get_next_key): Rewrite to support both int and str key iteration,
take bpf_transport_context.
(bpf_interpret): Pass bpf_transport_context to map_get_next_key.
bpf-translate.cxx
stapbpf/bpfinterp.cxx
This page took 0.025703 seconds and 5 git commands to generate.