Lines Matching refs:snapshot
1441 static void diag_snapshot_reg(struct bpf_diag_reg_snapshot *snapshot, in diag_snapshot_reg() argument
1444 snapshot->type = reg->type; in diag_snapshot_reg()
1446 snapshot->map_ptr = reg->map_ptr; in diag_snapshot_reg()
1448 snapshot->btf_id = reg->btf_id; in diag_snapshot_reg()
1449 snapshot->btf = reg->btf; in diag_snapshot_reg()
1451 snapshot->var_off = reg->var_off; in diag_snapshot_reg()
1452 snapshot->r64 = reg->r64; in diag_snapshot_reg()
1907 static bool diag_snapshot_unknown(const struct bpf_diag_reg_snapshot *snapshot) in diag_snapshot_unknown() argument
1909 return tnum_is_unknown(snapshot->var_off) && diag_cnum64_unknown(snapshot->r64); in diag_snapshot_unknown()
2076 const struct bpf_diag_reg_snapshot *snapshot) in diag_var_offset() argument
2078 if (tnum_is_const(snapshot->var_off)) in diag_var_offset()
2079 return bpf_diag_fmt(env, "at offset %lld", (s64)snapshot->var_off.value); in diag_var_offset()
2081 if (diag_snapshot_unknown(snapshot)) in diag_var_offset()
2086 snapshot->var_off.value, snapshot->var_off.mask, in diag_var_offset()
2087 diag_scalar_range(env, snapshot->r64)); in diag_var_offset()
2099 const struct bpf_diag_reg_snapshot *snapshot) in diag_reg_snapshot() argument
2101 const char *type_name = reg_type_str(env, snapshot->type); in diag_reg_snapshot()
2102 const char *offset = diag_var_offset(env, snapshot); in diag_reg_snapshot()
2103 const char *btf = snapshot->btf && snapshot->btf_id ? in diag_reg_snapshot()
2104 bpf_diag_fmt_btf_type(env, snapshot->btf, snapshot->btf_id) : NULL; in diag_reg_snapshot()
2107 if (snapshot->type == SCALAR_VALUE) { in diag_reg_snapshot()
2108 if (tnum_is_const(snapshot->var_off)) in diag_reg_snapshot()
2110 (s64)snapshot->var_off.value); in diag_reg_snapshot()
2111 if (diag_snapshot_unknown(snapshot)) in diag_reg_snapshot()
2113 if (cnum64_is_const(snapshot->r64)) in diag_reg_snapshot()
2115 cnum64_smin(snapshot->r64)); in diag_reg_snapshot()
2117 diag_scalar_range(env, snapshot->r64)); in diag_reg_snapshot()
2120 if (snapshot->type == NOT_INIT) in diag_reg_snapshot()
2123 if (base_type(snapshot->type) == PTR_TO_CTX) in diag_reg_snapshot()
2126 if (base_type(snapshot->type) == PTR_TO_STACK) in diag_reg_snapshot()
2129 if (base_type(snapshot->type) == PTR_TO_MAP_VALUE) { in diag_reg_snapshot()
2130 const char *kind = type_may_be_null(snapshot->type) ? "nullable map value" : in diag_reg_snapshot()
2133 map_name = diag_reg_map_name(snapshot->map_ptr); in diag_reg_snapshot()
2139 if (base_type(snapshot->type) == CONST_PTR_TO_MAP) { in diag_reg_snapshot()
2140 map_name = diag_reg_map_name(snapshot->map_ptr); in diag_reg_snapshot()
2146 if (type_is_non_owning_ref(snapshot->type)) { in diag_reg_snapshot()
2152 if (type_is_ptr_alloc_obj(snapshot->type)) { in diag_reg_snapshot()
2158 if (base_type(snapshot->type) == PTR_TO_BTF_ID && btf) in diag_reg_snapshot()