Lines Matching refs:wtr

442 static void show_map_header_json(struct bpf_map_info *info, json_writer_t *wtr)  in show_map_header_json()  argument
446 jsonw_uint_field(wtr, "id", info->id); in show_map_header_json()
449 jsonw_string_field(wtr, "type", map_type_str); in show_map_header_json()
451 jsonw_uint_field(wtr, "type", info->type); in show_map_header_json()
454 jsonw_string_field(wtr, "name", info->name); in show_map_header_json()
456 jsonw_name(wtr, "flags"); in show_map_header_json()
457 jsonw_printf(wtr, "%d", info->map_flags); in show_map_header_json()
815 map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr, in map_dump() argument
833 if (wtr) { in map_dump()
840 jsonw_start_object(wtr); /* map object */ in map_dump()
841 show_map_header_json(info, wtr); in map_dump()
842 jsonw_name(wtr, "elements"); in map_dump()
844 jsonw_start_array(wtr); /* elements */ in map_dump()
864 if (!dump_map_elem(fd, key, value, info, btf, wtr)) in map_dump()
869 if (wtr) { in map_dump()
870 jsonw_end_array(wtr); /* elements */ in map_dump()
872 jsonw_end_object(wtr); /* map object */ in map_dump()
889 json_writer_t *wtr = NULL, *btf_wtr = NULL; in do_dump() local
909 wtr = json_wtr; in do_dump()
919 wtr = btf_wtr; in do_dump()
925 if (wtr && nb_fds > 1) in do_dump()
926 jsonw_start_array(wtr); /* root array */ in do_dump()
932 err = map_dump(fds[i], &info, wtr, nb_fds > 1); in do_dump()
933 if (!wtr && i != nb_fds - 1) in do_dump()
940 if (wtr && nb_fds > 1) in do_dump()
941 jsonw_end_array(wtr); /* root array */ in do_dump()