在程式執行前紀錄時間T1,
並在程式執行後記錄時間T2
最後T2-T1後就是執行時間
#!/bin/bash
t1=$(date +"%s")
# Execute your process
...
t2=$(date +"%s")
echo $((t2-t1))
#!/bin/bash
t1=$(date +"%s")
# Execute your process
...
t2=$(date +"%s")
echo $((t2-t1))
echo "file xxx.c +p" > /sys/kernel/debug/dynamic_debug/control
echo "file xxx.c line 100 +p" > /sys/kernel/debug/dynamic_debug/control