diff --git a/ChangeLog b/ChangeLog index ddd2595..db351dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Improve support for Python processes running in containers. + Removed the exclude-empty option. + Bugfix: fixed a bug with the MOJO binary format that caused the line end position to wrongly be set to a non-zero value for CPython < 3.11, where line end information is not actually available. diff --git a/README.md b/README.md index 093380d..f036e72 100644 --- a/README.md +++ b/README.md @@ -330,8 +330,6 @@ requires no instrumentation and has practically no impact on the tracee. https://github.com/P403n1x87/austin/wiki/The-MOJO-file-format for more details. -C, --children Attach to child processes. - -e, --exclude-empty Do not output samples of threads with no frame - stacks. -f, --full Produce the full set of metrics (time +mem -mem). -g, --gc Sample the garbage collector state. -h, --heap=n_mb Maximum heap size to allocate to increase sampling diff --git a/src/argparse.c b/src/argparse.c index 893e238..3683217 100644 --- a/src/argparse.c +++ b/src/argparse.c @@ -70,7 +70,6 @@ parsed_args_t pargs = { /* timeout */ DEFAULT_INIT_TIMEOUT_MS * 1000, /* attach_pid */ 0, /* where */ 0, - /* exclude_empty */ 0, /* sleepless */ 0, /* format */ (char *) SAMPLE_FORMAT_NORMAL, #ifdef NATIVE @@ -219,10 +218,6 @@ static struct argp_option options[] = { "timeout", 't', "n_ms", 0, "Start up wait time in milliseconds (default is 100). Accepted units: s, ms." }, - { - "exclude-empty",'e', NULL, 0, - "Do not output samples of threads with no frame stacks." - }, { "sleepless", 's', NULL, 0, "Suppress idle samples to estimate CPU time." @@ -339,10 +334,6 @@ parse_opt (int key, char *arg, struct argp_state *state) pargs.binary = 1; break; - case 'e': - pargs.exclude_empty = 1; - break; - case 's': pargs.sleepless = 1; break; @@ -566,8 +557,6 @@ print(";") " https://github.com/P403n1x87/austin/wiki/The-MOJO-file-format\n" " for more details.\n" " -C, --children Attach to child processes.\n" -" -e, --exclude-empty Do not output samples of threads with no frame\n" -" stacks.\n" " -f, --full Produce the full set of metrics (time +mem -mem).\n" " -g, --gc Sample the garbage collector state.\n" " -h, --heap=n_mb Maximum heap size to allocate to increase sampling\n" @@ -602,12 +591,11 @@ for line in check_output(["src/austin", "--usage"]).decode().strip().splitlines( print(f'"{line}\\n"') print(";") ]]]*/ -"Usage: austin [-bCefgmPs?V] [-h n_mb] [-i n_us] [-o FILE] [-p PID] [-t n_ms]\n" -" [-w PID] [-x n_sec] [--binary] [--children] [--exclude-empty]\n" -" [--full] [--gc] [--heap=n_mb] [--interval=n_us] [--memory]\n" -" [--output=FILE] [--pid=PID] [--pipe] [--sleepless] [--timeout=n_ms]\n" -" [--where=PID] [--exposure=n_sec] [--help] [--usage] [--version]\n" -" command [ARG...]\n" +"Usage: austin [-bCfgmPs?V] [-h n_mb] [-i n_us] [-o FILE] [-p PID] [-t n_ms]\n" +" [-w PID] [-x n_sec] [--binary] [--children] [--full] [--gc]\n" +" [--heap=n_mb] [--interval=n_us] [--memory] [--output=FILE]\n" +" [--pid=PID] [--pipe] [--sleepless] [--timeout=n_ms] [--where=PID]\n" +" [--exposure=n_sec] [--help] [--usage] [--version] command [ARG...]\n" ; /*[[[end]]]*/ @@ -686,10 +674,6 @@ cb(const char opt, const char * arg) { pargs.binary = 1; break; - case 'e': - pargs.exclude_empty = 1; - break; - case 's': pargs.sleepless = 1; break; diff --git a/src/argparse.h b/src/argparse.h index cfa791c..4beb847 100644 --- a/src/argparse.h +++ b/src/argparse.h @@ -35,7 +35,6 @@ typedef struct { ctime_t timeout; pid_t attach_pid; int where; - int exclude_empty; int sleepless; char * format; #ifdef NATIVE diff --git a/src/austin.1 b/src/austin.1 index 1294157..5d1433b 100644 --- a/src/austin.1 +++ b/src/austin.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. -.TH AUSTIN "1" "October 2023" "austin 3.6.0" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH AUSTIN "1" "February 2024" "austin 3.7.0" "User Commands" .SH NAME austin \- Frame stack sampler for CPython .SH SYNOPSIS @@ -18,10 +18,6 @@ for more details. \fB\-C\fR, \fB\-\-children\fR Attach to child processes. .TP -\fB\-e\fR, \fB\-\-exclude\-empty\fR -Do not output samples of threads with no frame -stacks. -.TP \fB\-f\fR, \fB\-\-full\fR Produce the full set of metrics (time +mem \fB\-mem\fR). .TP diff --git a/src/py_thread.c b/src/py_thread.c index 3c43bf2..256ffbd 100644 --- a/src/py_thread.c +++ b/src/py_thread.c @@ -894,10 +894,6 @@ py_thread__emit_collapsed_stack(py_thread_t * self, int64_t interp_id, ctime_t t if (self->invalid) return; - if (pargs.exclude_empty && stack_is_empty()) - // Skip if thread has no frames and we want to exclude empty threads - return; - if (mem_delta == 0 && time_delta == 0) return;