diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-08-13 11:29:40 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-08-13 11:29:40 +0000 |
commit | 34c8f8abef1f6b471394292e9eb47a0679fb2fcf (patch) | |
tree | 11b0ee9a19c0dfa100beee60649e56643102ab89 /usr.sbin | |
parent | 5a8e2a5ee075c3e6482827a70acc41d9f2632501 (diff) |
Improve documentation.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/btrace/bt_parser.h | 16 | ||||
-rw-r--r-- | usr.sbin/btrace/btrace.h | 4 |
2 files changed, 14 insertions, 6 deletions
diff --git a/usr.sbin/btrace/bt_parser.h b/usr.sbin/btrace/bt_parser.h index 0eaa65a07eb..f1c710a5071 100644 --- a/usr.sbin/btrace/bt_parser.h +++ b/usr.sbin/btrace/bt_parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_parser.h,v 1.8 2020/07/11 14:52:14 mpi Exp $ */ +/* $OpenBSD: bt_parser.h,v 1.9 2020/08/13 11:29:39 mpi Exp $ */ /* * Copyright (c) 2019-2020 Martin Pieuchot <mpi@openbsd.org> @@ -24,7 +24,10 @@ #endif /* - * Representation of a probe. + * Probes represent entry points where events can be recorded. + * + * Those specified in a given bt(5) script are enabled at runtime. They + * are represented as: * * "provider:function:name" * or @@ -85,6 +88,8 @@ struct bt_rule { /* * Global variable representation. + * + * Variables are untyped and also include maps and histograms. */ struct bt_var { SLIST_ENTRY(bt_var) bv_next; /* linkage in global list */ @@ -144,8 +149,11 @@ struct bt_arg { #define BA_INITIALIZER(v, t) { { NULL }, (void *)(v), NULL, (t) } /* - * Statements define what should be done with each event recorded - * by the corresponding probe. + * Each action associated with a given probe is made of at least one + * statement. + * + * Statements are interpreted linearly in userland to format data + * recorded in the form of events. */ struct bt_stmt { SLIST_ENTRY(bt_stmt) bs_next; diff --git a/usr.sbin/btrace/btrace.h b/usr.sbin/btrace/btrace.h index 1cbbbf8d525..6905b187112 100644 --- a/usr.sbin/btrace/btrace.h +++ b/usr.sbin/btrace/btrace.h @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.h,v 1.7 2020/08/07 14:04:59 mpi Exp $ */ +/* $OpenBSD: btrace.h,v 1.8 2020/08/13 11:29:39 mpi Exp $ */ /* * Copyright (c) 2019 - 2020 Martin Pieuchot <mpi@openbsd.org> @@ -51,7 +51,7 @@ void map_zero(struct map *); struct hist *hist_increment(struct hist *, const char *, long); void hist_print(struct hist *, const char *); -#define KLEN 512 /* number of characters in a key */ +#define KLEN 512 /* # of characters in map key, contain a stack trace */ /* printf.c */ int stmt_printf(struct bt_stmt *, struct dt_evt *); |