|
|
|
@ -152,6 +152,11 @@ fi |
|
|
|
|
echo 0 > /sys/kernel/debug/tracing/tracing_on |
|
|
|
|
echo nop > /sys/kernel/debug/tracing/current_tracer |
|
|
|
|
|
|
|
|
|
if [ "x$perfetto_loops" != "x" ] ; then |
|
|
|
|
echo "perfetto_loops parameter not given" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ "x$perfetto_loops" != "x0" ]; then |
|
|
|
|
/perfetto/out/dist/traced & |
|
|
|
|
/perfetto/out/dist/traced_probes & |
|
|
|
|
sleep 1 |
|
|
|
@ -160,17 +165,10 @@ sleep 1 |
|
|
|
|
/perfetto/out/dist/perfetto --txt -c /usr/local/perfetto-host.cfg -o /tmp/perfetto-host.trace --detach=mykey |
|
|
|
|
sleep 1 |
|
|
|
|
|
|
|
|
|
if [ "x$perfetto_loops" != "x" ] ; then |
|
|
|
|
echo "perfetto_loops parameter not given" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
echo "Replaying for Perfetto:" |
|
|
|
|
LOOP= |
|
|
|
|
if [ "x$perfetto_loops" != "x0" ]; then |
|
|
|
|
LOOP="--loop=$perfetto_loops" |
|
|
|
|
eglretrace --benchmark --singlethread --loop=$perfetto_loops $wait_after_frame --headless "/traces-db/${trace}" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
eglretrace --benchmark --singlethread $LOOP $wait_after_frame --headless "/traces-db/${trace}" |
|
|
|
|
|
|
|
|
|
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
|
|
|
|
echo 1 > /proc/sys/net/ipv4/ip_forward |
|
|
|
@ -212,6 +210,7 @@ crosvm run \ |
|
|
|
|
rm -f /traces-db/current_trace |
|
|
|
|
rm -f /traces-db/command |
|
|
|
|
|
|
|
|
|
if [ "x$perfetto_loops" != "x0" ]; then |
|
|
|
|
/perfetto/out/dist/perfetto --attach=mykey --stop |
|
|
|
|
|
|
|
|
|
mv /tmp/perfetto-host.trace "$host_perf" |
|
|
|
@ -224,4 +223,6 @@ kill `pidof traced_probes` || echo "traced_probes was not running (anymore)" |
|
|
|
|
kill `pidof traced` || echo "traced was not running (anymore=" |
|
|
|
|
|
|
|
|
|
/usr/local/merge_traces.py "$host_perf" "$guest_perf" "$summary_perf" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
sleep 1 |
|
|
|
|