Pretty simple...allow using the "cpu" special variable where a long is expected, like in hist/lhist.
(note: the switch/case is in enum order, not alphabetical order) OK? Index: btrace.c =================================================================== RCS file: /cvs/src/usr.sbin/btrace/btrace.c,v retrieving revision 1.35 diff -u -p -r1.35 btrace.c --- btrace.c 22 Apr 2021 09:36:39 -0000 1.35 +++ btrace.c 4 Jun 2021 12:47:27 -0000 @@ -1180,6 +1180,9 @@ ba2long(struct bt_arg *ba, struct dt_evt case B_AT_BI_TID: val = dtev->dtev_tid; break; + case B_AT_BI_CPU: + val = dtev->dtev_cpu; + break; case B_AT_BI_NSECS: val = builtin_nsecs(dtev); break;