Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-01-27 | commons used rather than externs, fix for -fno-common | Theo de Raadt | |
2021-01-21 | Make it possible to convert map arguments to long and insert nsecs in maps. | Martin Pieuchot | |
Necessary to measure latency, example below to better understand the kqueue select(2) regression: syscall:select:entry { @start[pid] = nsecs; } syscall:select:return { @usecs = hist((nsecs - @start[pid]) / 1000); } | |||
2021-01-10 | Exclude the 'hz' token from the lexer backdoor, so interval and profile | Jonathan Matthew | |
probes can be parsed again. ok anton@ kn@ | |||
2020-12-11 | Tracing syscalls which conflict with reserved bt(5) keywords currently | anton | |
causes btrace to reject such programs. An example is exit which is both a syscall and a builtin btrace function. Pointed out by bluhm@ To resolve the conflict, make use of a lexer backdoor. A concept described in the original yacc paper and also found in other yacc parsers in our tree. ok bluhm@ mpi@ | |||
2020-12-07 | In revision 1.18 of bt_parse.y, I missed the fact that the print() | anton | |
function accepts an optional argument representing the number of map entries to print. ok bluhm@ mpi@ | |||
2020-12-07 | In btrace(8) handle snprintf(3) errors correctly. If snprintf | Alexander Bluhm | |
fails, buffer is unchanged; initialize it with empty string. snprintf may return negative value or the length that would have been written; check and calculate remaining size. snprintf writes size - 1 characters; pass buffer size as length. OK mpi@ | |||
2020-12-01 | The print() function only accepts a single argument. | anton | |
ok mpi@ | |||
2020-09-18 | fix typo in comment and trailing whitespace | Jasper Lievisse Adriaanse | |
2020-09-18 | various fixes; ok mpi | Jason McIntyre | |
2020-09-17 | document min/max/sum function | Jasper Lievisse Adriaanse | |
ok mpi@ | |||
2020-09-15 | consistently format/word the function documentation | Jasper Lievisse Adriaanse | |
2020-09-14 | add support for '&' and '|' operators in btrace scripts | Jasper Lievisse Adriaanse | |
feedback from otto@ ok mpi@ kn@ semarie@ | |||
2020-09-11 | Support '-p' a flag to filter all actions by PID. | Martin Pieuchot | |
2020-08-13 | Be compatible with bpftrace(8)'s output when printing stack traces in maps. | Martin Pieuchot | |
This allows us to use `stackcollapse-bpftrace.pl' from Brendan Gregg's FrameGraph without pre-processing outputs. | |||
2020-08-13 | When dealing with integers, it seems that [1] and [1, 2) are the same. | Martin Pieuchot | |
2020-08-13 | Improve documentation. | Martin Pieuchot | |
2020-08-07 | Do not hardcode the key length. | Martin Pieuchot | |
2020-07-11 | Implement linear and power-of-two histograms: hist() and lhist() keywords. | Martin Pieuchot | |
This is built on top of maps which are currently built on top of RB-trees. Improvements are welcome! For example the use of a hashing table as pointed by espie@. The following one-liner produce an histogram of power-of-two values returned by the read(2) syscall: btrace 'syscall:read:return { @bytes = hist(retval); }' ^C @bytes: [0] 19 |@@@@@@@@@@@@@@@@@@@@@@@@@@ | [1] 26 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [1, 2) 1 |@ | [2, 4) 13 |@@@@@@@@@@@@@@@@@@ | [4, 8) 4 |@@@@@ | [8, 16) 3 |@@@@ | [16, 32) 1 |@ | [32, 64) 8 |@@@@@@@@@@@ | [64, 128) 14 |@@@@@@@@@@@@@@@@@@@ | [128, 256) 7 |@@@@@@@@@ | [256, 512) 37 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [512, 1K) 1 |@ | [1K, 2K) 10 |@@@@@@@@@@@@@@ | [2K, 4K) 11 |@@@@@@@@@@@@@@@ | [8K, 16K) 1 |@ | | |||
2020-07-04 | Print the correct register for syscall return value. | Martin Pieuchot | |
While here make it possible to store syscall return values in maps. | |||
2020-07-03 | Increment line number when skipping multi-line comments. | Martin Pieuchot | |
2020-06-22 | Fix "the symbol HZ is undefined" yacc warning | kn | |
OK mpi | |||
2020-06-18 | Apply rules to the number of events returned by the last read(2). | Martin Pieuchot | |
Fix a corner case where old events could be re-evaluated. From Yuichiro NAITO. | |||
2020-04-24 | Simplify the grammar by letting the lexer handle builtin keywords. | Martin Pieuchot | |
Also clarify various constructs by using commonly understood names like 'expr' and 'vargs'. | |||
2020-04-24 | Print given identifier in the error message when no matching probe exist. | Martin Pieuchot | |
2020-04-23 | Implement builtin 'cpu' keyword. | Martin Pieuchot | |
This is useful to know which CPU recorded a given event. While here document 'retval' and comment out 'ustack' until we have a way to capture userland stacks. | |||
2020-04-23 | Extend map to support keys composed of multiple arguments. | Martin Pieuchot | |
Keys are still strings representing the output value. The following example is now possible to count the number of "on CPU" events ordered by thread ID and executable name: # btrace -e 'tracepoint:sched:on__cpu { @[tid, comm] = count() }' ^C @[138836, idle0]: 830941 @[161307, sshd]: 716476 @[482901, softnet]: 582008 @[104443, systqmp]: 405749 @[269230, update]: 396133 @[326533, softclock]: 316926 @[61040, sshd]: 177201 @[453567, reaper]: 119676 @[446052, ksh]: 85675 @[26270, syslogd]: 66625 @[504699, sshd]: 52958 @[446052, sshd]: 32207 @[44046, tset]: 13333 @[162960, zerothread]: 101 @[313046, ntpd]: 1 | |||
2020-04-23 | Make debug output less verbose. | Martin Pieuchot | |
2020-04-15 | Make map functions accept a "struct map *" instead of a "struct bt_var *". | Martin Pieuchot | |
This is a step towards reducing the type casting crazyness. | |||
2020-04-15 | Document filters: one type of predicates checked in kernel. | Martin Pieuchot | |
By default a PID filter is set by dt(4) to not record events for the tracing program. The other type of predicates, which are checked in userland, is coming soon! | |||
2020-04-15 | Crank key size to 256 to avoid conflicts when storing stack traces in maps. | Martin Pieuchot | |
2020-04-15 | Stop including <machine/param.h> and <machine/vmparam.h>. | Martin Pieuchot | |
There's no need to redefine the INKERNEL() macro in userland because stacktrace_save_at() only saves kernel stack traces. If we decide to use the same interface to unwind & save userland stack traces we can simply indicate that in the "struct stacktrace". Discussed with deraadt@ and kettenis@ | |||
2020-03-27 | btrace(8): simplify builtin_nsecs(); ok mpi@ | cheloha | |
2020-03-27 | Skip first line if it starts with '#!' | Martin Pieuchot | |
2020-03-23 | Map are printed by default now, document that option "-c" is needed :) | Martin Pieuchot | |
2020-03-23 | Some architectures require <machine/param.h> to use VM_MIN_KERNEL_ADDRESS. | Martin Pieuchot | |
Fix build on at least sparc64 | |||
2020-03-23 | Document some functions. | Martin Pieuchot | |
2020-03-23 | Print maps when exiting unless an END rule has been defined. | Martin Pieuchot | |
This allows to use oneliners like: # btrace -e 'profile:hz:99 { @[tid] = count(); }' ok kn@ | |||
2020-03-20 | Document exit, zero and delete functions | kn | |
While here, reword existing function descriptions a little. Feedback OK mpi jmc | |||
2020-03-19 | Use bv_name() in debug output and include the hash of a map. | Martin Pieuchot | |
2020-03-19 | Add support for unnamed map. | Martin Pieuchot | |
The following is now possible but won't print anything by default: # btrace -e 'profile:hz:99 { @[kstack] = count() }' ok patrick@, tobhe@ | |||
2020-03-19 | When looking at which data should be recorded by the kernel include the | Martin Pieuchot | |
key of a map. This makes map indexed by stack traces work. For example to know where the sleeps are coming from: tracepoint:sched:sleep { @map[kstack] = count(); } ok patrick@, tobhe@ | |||
2020-03-18 | time() takes a strftime(3) format string | kn | |
OK mpi | |||
2020-03-18 | Whitelist 'map' type in order to use them in real (non BEGIN/END) rules. | Martin Pieuchot | |
2020-03-16 | Fix affectation that should be conditionnal tests inside asserts. | Martin Pieuchot | |
From tom@ | |||
2020-01-28 | Implement map functions min(), max() and sum(). | Martin Pieuchot | |
For the moment map values are currently limited to integers. | |||
2020-01-28 | Use %left to prevent S/R conflicts, arithmetic precedence is still broken. | Martin Pieuchot | |
2020-01-28 | Simplify statement rules by using an optional new line. | Martin Pieuchot | |
2020-01-28 | Implement delete() and @map[key] access. | Martin Pieuchot | |
2020-01-28 | Rename *_concat() into *_append() to match reality. | Martin Pieuchot | |
2020-01-28 | Parse '==' without error in filters. | Martin Pieuchot | |
From Benjamin Baier. |