Skip to content

Commit

Permalink
Release v3.7.0
Browse files Browse the repository at this point in the history
Release v3.7.0
  • Loading branch information
P403n1x87 authored Oct 14, 2024
2 parents fc1a73b + f7691cd commit d624d58
Show file tree
Hide file tree
Showing 33 changed files with 495 additions and 165 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,27 @@ on:
jobs:
check-manpage:
runs-on: ubuntu-20.04
name: Check manpage
name: Check docs
steps:
- uses: actions/checkout@v3

- name: Install build dependencies
run: |
sudo add-apt-repository -y universe
sudo add-apt-repository -y ppa:inkscape.dev/stable
sudo apt-get update
sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev help2man
sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev help2man inkscape
- name: Compile Austin
run: |
autoreconf --install
./configure
make
- name: Generate manpage
run: bash doc/genman.sh
- name: Generate docs
run: bash doc/gen.sh

- name: Check manpage
- name: Check docs
run: git diff -I".* DO NOT MODIFY.*" -I"[.]TH AUSTIN.*" --exit-code src/austin.1

cppcheck-linux:
Expand Down Expand Up @@ -89,7 +91,7 @@ jobs:
run: brew install cppcheck

- name: Check source code
run: cppcheck -q -f --error-exitcode=1 --inline-suppr src
run: cppcheck -q -f --error-exitcode=1 --inline-suppr --check-level=exhaustive src

codespell:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -156,7 +158,7 @@ jobs:
sudo apt-get update
sudo apt-get -y install \
valgrind \
python3.{8..12} \
python3.{8..13} \
python3.10-full python3.10-dev
python3.10 -m venv .venv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
sed -i "" "s/$PREV_VERSION/$VERSION/g" src/austin.h
echo "::set-output name=version::$VERSION"
gcc-11 -Wall -O3 -Os -o src/austin src/*.c
gcc-12 -Wall -O3 -Os -o src/austin src/*.c
pushd src
zip -r austin-${VERSION}-mac64.zip austin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
/bin/find . -type f -exec sed -i "s/%VERSION%/$VERSION/g" {} \; ;
choco apikey --key ${{ secrets.CHOCO_APIKEY }} --source https://push.chocolatey.org/
choco pack
choco push
choco push --source https://push.chocolatey.org/
popd
- name: Upload artifacts to release
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
export VERSION=$(cat src/austin.h | sed -n -E "s/^#define VERSION[ ]+\"(.+)\"/\1/p")
echo "::set-output name=version::$VERSION"
gcc-11 -Wall -O3 -Os -o src/austin src/*.c
gcc-12 -Wall -O3 -Os -o src/austin src/*.c
pushd src
zip -r austin-${VERSION}-mac64.zip austin
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

env:
AUSTIN_TESTS_PYTHON_VERSIONS: ${{ matrix.python-version }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Run functional Austin tests (with sudo)
run: |
ulimit -c unlimited
echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern
sudo echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern
sudo -E env PATH="$PATH" .venv/bin/pytest --pastebin=failed -svr a test/functional -k "not austinp"
if: always()

Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
- uses: actions/checkout@v3

- name: Compile Austin
run: gcc-11 -Wall -Werror -O3 -g src/*.c -o src/austin
run: gcc-12 -Wall -Werror -O3 -g src/*.c -o src/austin

- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

env:
AUSTIN_TESTS_PYTHON_VERSIONS: ${{ matrix.python-version }}
Expand Down Expand Up @@ -385,7 +385,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

env:
AUSTIN_TESTS_PYTHON_VERSIONS: ${{ matrix.python-version }}
Expand Down Expand Up @@ -474,7 +474,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

env:
AUSTIN_TESTS_PYTHON_VERSIONS: ${{ matrix.python-version }}
Expand Down
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2024-10-14 v3.7.0

Added support for CPython 3.13.

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.


2023-10-04 v3.6.0

Added support for CPython 3.12
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,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
Expand Down Expand Up @@ -561,7 +559,7 @@ folder in either the SVG, PDF or PNG format

# Compatibility

Austin supports Python 3.8 through 3.12, and has been tested on the following
Austin supports Python 3.8 through 3.13, and has been tested on the following
platforms and architectures

| | <img src="art/tux.svg" /> | <img src="art/win.svg"/> | <img src="art/apple.svg"/> |
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AC_PREREQ([2.69])
# from scripts.utils import get_current_version_from_changelog as version
# print(f"AC_INIT([austin], [{version()}], [https://github.com/p403n1x87/austin/issues])")
# ]]]
AC_INIT([austin], [3.6.0], [https://github.com/p403n1x87/austin/issues])
AC_INIT([austin], [3.7.0], [https://github.com/p403n1x87/austin/issues])
# [[[end]]]
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
Expand Down
Binary file modified doc/cheatsheet.pdf
Binary file not shown.
Binary file modified doc/cheatsheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/cheatsheet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions doc/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

help2man \
-n "Frame stack sampler for CPython" \
-i doc/examples.troff \
src/austin > src/austin.1

VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"([0-9]+[.][0-9]+).*\"/\1/p")

# Update the version in the SVG file
if [[ $(uname) == "Darwin" ]]; then
sed -E -i '' "s/for version [0-9]+[.][0-9]+/for version $VERSION/g" "doc/cheatsheet.svg"
else
sed -i "s/for version [0-9]+[.][0-9]+/for version $VERSION/g" "doc/cheatsheet.svg"
fi

inkscape \
--export-type="png" \
--export-filename="doc/cheatsheet.png" \
--export-dpi=192 \
doc/cheatsheet.svg

inkscape \
--export-type="pdf" \
--export-filename="doc/cheatsheet.pdf" \
doc/cheatsheet.svg
6 changes: 0 additions & 6 deletions doc/genman.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from common import download_release
from scipy.stats import ttest_ind

VERSIONS = ("3.4.1", "3.5.0", "dev")
VERSIONS = ("3.5.0", "3.6.0", "dev")
SCENARIOS = [
*[
(
Expand Down
1 change: 1 addition & 0 deletions scripts/build-wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
"Project-URL": [
"Homepage, https://github.com/P403n1x87/austin",
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ base: core20
# from scripts.utils import get_current_version_from_changelog as version
# print(f"version: '{version()}+git'")
# ]]]
version: '3.6.0+git'
version: '3.7.0+git'
# [[[end]]]
summary: A Python frame stack sampler for CPython
description: |
Expand Down
30 changes: 7 additions & 23 deletions src/argparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -112,7 +111,7 @@ str_to_num(char * str, long * num) {
/**
* Parse the interval argument.
*
* This acceps s, ms and us as units. The result is in microseconds.
* This accepts s, ms and us as units. The result is in microseconds.
*/
static int
parse_interval(char * str, long * num) {
Expand Down Expand Up @@ -150,7 +149,7 @@ parse_interval(char * str, long * num) {
/**
* Parse the timeout argument.
*
* This acceps s and ms as units. The result is in milliseconds.
* This accepts s and ms as units. The result is in milliseconds.
*/
static int
parse_timeout(char * str, long * num) {
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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]]]*/

Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/argparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ typedef struct {
ctime_t timeout;
pid_t attach_pid;
int where;
int exclude_empty;
int sleepless;
char * format;
#ifdef NATIVE
Expand Down
8 changes: 2 additions & 6 deletions src/austin.1
Original file line number Diff line number Diff line change
@@ -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" "October 2024" "austin 3.7.0" "User Commands"
.SH NAME
austin \- Frame stack sampler for CPython
.SH SYNOPSIS
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/austin.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ int main(int argc, char ** argv) {

logger_init();
if (!pargs.pipe)
log_header();
log_header(); // cppcheck-suppress [unknownMacro]

if (exec_arg <= 0 && pargs.attach_pid == 0) {
_msg(MCMDLINE);
Expand Down
2 changes: 1 addition & 1 deletion src/austin.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from scripts.utils import get_current_version_from_changelog as version
print(f'#define VERSION "{version()}"')
]]] */
#define VERSION "3.6.0"
#define VERSION "3.7.0"
// [[[end]]]

#endif
2 changes: 1 addition & 1 deletion src/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ _frame_from_code_raddr(py_proc_t * py_proc, void * code_raddr, int lasti, python
ssize_t len = 0;

unsigned int lineno = V_FIELD(unsigned int, code, py_code, o_firstlineno);
unsigned int line_end = lineno;
unsigned int line_end = 0;
unsigned int column = 0;
unsigned int column_end = 0;

Expand Down
Loading

0 comments on commit d624d58

Please sign in to comment.