mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
25 lines
641 B
Bash
Executable File
25 lines
641 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ARGS="${ARGS:--O0 -X heapsize=100000}"
|
|
MAIN="${MAIN:-main.py}"
|
|
BROWSER="${BROWSER:-chromium}"
|
|
|
|
cd `dirname $0`/src
|
|
|
|
case "$1" in
|
|
"-d")
|
|
shift
|
|
gdb --args ../vendor/micropython/unix/micropython $ARGS $* $MAIN
|
|
;;
|
|
"-p")
|
|
shift
|
|
../vendor/micropython/unix/micropython $ARGS $* $MAIN &
|
|
perf record -F 100 -p $! -g -- sleep 600
|
|
perf script > perf.trace
|
|
../vendor/flamegraph/stackcollapse-perf.pl perf.trace | ../vendor/flamegraph/flamegraph.pl > perf.svg
|
|
$BROWSER perf.svg
|
|
;;
|
|
*)
|
|
../vendor/micropython/unix/micropython $ARGS $* $MAIN
|
|
esac
|