From b8fe31fa38b82d176b9a456e3b053146fe0c4ffe Mon Sep 17 00:00:00 2001 From: mpi Date: Wed, 1 Sep 2021 07:35:21 +0000 Subject: [PATCH] Support for insert pid/tid/cpu builtins in map/hist. --- usr.sbin/btrace/btrace.c | 4 ++-- usr.sbin/btrace/map.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index 8481601ab8f..6c220940999 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,7 +1,7 @@ -/* $OpenBSD: btrace.c,v 1.42 2021/08/31 12:51:24 mpi Exp $ */ +/* $OpenBSD: btrace.c,v 1.43 2021/09/01 07:35:21 mpi Exp $ */ /* - * Copyright (c) 2019 - 2020 Martin Pieuchot + * Copyright (c) 2019 - 2021 Martin Pieuchot * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/usr.sbin/btrace/map.c b/usr.sbin/btrace/map.c index a3ad6a88755..b5bb8fb76ef 100644 --- a/usr.sbin/btrace/map.c +++ b/usr.sbin/btrace/map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: map.c,v 1.14 2021/08/31 11:30:21 mpi Exp $ */ +/* $OpenBSD: map.c,v 1.15 2021/09/01 07:35:21 mpi Exp $ */ /* * Copyright (c) 2020 Martin Pieuchot @@ -138,6 +138,9 @@ map_insert(struct map *map, const char *key, struct bt_arg *bval, free(mep->mval); mep->mval = bval; break; + case B_AT_BI_PID: + case B_AT_BI_TID: + case B_AT_BI_CPU: case B_AT_BI_NSECS: case B_AT_BI_ARG0 ... B_AT_BI_ARG9: case B_AT_BI_RETVAL: -- 2.20.1