/usr/share/sagemath/bin/sage-callgrind is in sagemath-common 7.4-9.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/env bash
if [ ! -d "$DOT_SAGE/valgrind" ]; then
mkdir "$DOT_SAGE/valgrind"
fi
LOG="$DOT_SAGE"/valgrind/sage-callgrind.%p
CALLGRIND_FLAGS="--callgrind-out-file=$LOG "
if [ "$SAGE_CALLGRIND_FLAGS" ]; then
echo "Overwriting callgrind flags with: $SAGE_CALLGRIND_FLAGS"
CALLGRIND_FLAGS=$SAGE_CALLGRIND_FLAGS
else
echo "Using default flags: $CALLGRIND_FLAGS"
fi
valgrind --tool=callgrind $CALLGRIND_FLAGS python "$SAGE_SCRIPTS_DIR/sage-ipython" "$@" -i
|