Skip to content

Instantly share code, notes, and snippets.

@paranlee
Created October 2, 2023 01:22
Show Gist options
  • Save paranlee/5945874848574e1b8243c78e241dfb83 to your computer and use it in GitHub Desktop.
Save paranlee/5945874848574e1b8243c78e241dfb83 to your computer and use it in GitHub Desktop.
erlang with uftrace
export CXXFLAGS="-g3 -O0 -pg"
make clean -j4
./configure
make -j -C erts/emulator debug
make -j4
make -j -C erts/emulator debug
make -j4 -C debug

export ERL_TOP=`pwd`
/home/kim/otp/bin/aarch64-unknown-linux-gnu/beam.debug.smp -- -root/home/kim/otp -bindir /home/kim/otp/bin/aarch64-unknown-linux-gnu -progname /home/kim/otp/bin/cerl -emu_type debug
/home/kim/otp/bin/aarch64-unknown-linux-gnu/beam.debug.smp -- -root /home/kim/otp -bindir /home/kim/otp/bin/aarch64-unknown-linux-gnu -progname /home/kim/otp/bin/cerl -emu_type debug -- -home /home/kim -- -emu_type debug -noshell -noinput -eval 'io:format("hello world~n").' -s init stop
uf record /home/kim/otp/bin/aarch64-unknown-linux-gnu/beam.debug.smp -- -root /home/kim/otp -bindir /home/kim/otp/bin/aarch64-unknown-linux-gnu -progname /home/kim/otp/bin/cerl -emu_type debug -- -home /home/kim -- -emu_type debug -noshell -noinput -eval 'io:format("hello world~n").' -s init stop

uf dump --chrome
uf dump --chrome > otp.json

export BINDIR=/home/kim/otp/bin/aarch64-unknown-linux-gnu
/home/kim/otp/bin/aarch64-unknown-linux-gnu/beam.debug.smp -- -root /home/kim/otp -bindir /home/kim/otp/bin/aarch64-unknown-linux-gnu -progname /home/kim/otp/bin/cerl -emu_type debug -- -home /home/kim -- -emu_type debug -noshell -noinput -eval 'io:format("hello world~n").' -s init stop
/home/kim/otp/bin/aarch64-unknown-linux-gnu/beam.debug.smp -- -root /home/kim/otp -bindir /home/kim/otp/bin/aarch64-unknown-linux-gnu -progname /home/kim/otp/bin/cerl -emu_type debug -- -home /home/kim -- -emu_type debug
/home/kim/otp/bin/aarch64-unknown-linux-gnu/beam.debug.smp -- -root /home/kim/otp -bindir /home/kim/otp/bin/aarch64-unknown-linux-gnu -progname /home/kim/otp/bin/cerl -emu_type debug -- -home /home/kim -- -emu_type debug

export CXXFLAGS="-g3 -O0 -pg"
export CFLAGS="-g3 -O0 -pg"
export ERL_TOP=`pwd`
make -j4 -C erts/emulator debug
bin/cerl -emu_type debug
uf record bin/cerl -emu_type debug -noinput -eval 'io:format("hello world~n").' -s init stop
bin/cerl -emu_type debug -noinput -eval 'io:format("hello world~n").' -s init stop
uf record bin/cerl -emu_type debug -noinput -eval 'io:format("hello world~n").' -s init stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment