Lines Matching +full:local +full:- +full:dir
8 # http://www.apache.org/licenses/LICENSE-2.0
15 set -e
25 local out=$1
26 gn args $out --list --short | grep 'monolithic_binaries = true' 2>&1 >/dev/null
31 local out=$1
32 gn args $out --list --short | grep 'target_os = "android"' 2>&1 >/dev/null
37 ! test -d /proc
45 if [ ! -w /sys/kernel/debug ]; then
46 echo "debugfs not accessible, try sudo chown -R $USER /sys/kernel/debug"
47 sudo chown -R $USER /sys/kernel/debug
55 adb --help 2>&1 | grep 'push.*\[--sync\]' 2>&1 >/dev/null
60 local maybe_sync=''
62 maybe_sync='--sync '
64 echo adb push $maybe_sync $1 $DIR
65 adb push $maybe_sync $1 $DIR
67 echo cp $1 $DIR
68 cp $1 $DIR
74 echo adb pull $DIR/$1 $2
75 adb pull $DIR/$1 $2
77 echo mv $DIR/$1 $2
78 mv $DIR/$1 $2
91 # If not set guess the OUT dir using the latest directory.
92 if [ ! -f "$OUT/args.gn" ]; then
100 CONFIG="${CONFIG:-:test}"
103 DIR=/data/local/tmp
105 DIR=$(mktemp -d $TMPDIR/perfetto.XXXXXX)
107 DIR=$(mktemp -p $TMPDIR -d perfetto.XXXXXX)
110 tools/ninja -C $OUT traced traced_probes perfetto trace_to_text test/configs
124 PREFIX="$PREFIX LD_LIBRARY_PATH=$DIR"
133 if [[ ! -f $CONFIG_PATH ]]; then
142 if [[ ! -f $CONFIG_PATH ]]; then
144 if [[ ! -f $CONFIG_PATH ]]; then
149 CMD_OPTS="--txt $CMD_OPTS"
155 if [[ background -eq 1 ]]; then
160 if tmux has-session -t demo; then
161 tmux kill-session -t demo
163 tmux -2 new-session -d -s demo
165 if tmux -V | awk '{split($2, ver, "."); if (ver[1] < 2) exit 1 ; else if (ver[1] == 2 && ver[2] < 1…
166 tmux set-option -g mouse on
168 tmux set-option -g mode-mouse on
169 tmux set-option -g mouse-resize-pane on
170 tmux set-option -g mouse-select-pane on
171 tmux set-option -g mouse-select-window on
174 tmux split-window -v
175 tmux split-window -v
177 tmux select-layout even-vertical
179 tmux select-pane -t 0
180 tmux send-keys "clear" C-m
182 tmux send-keys "adb shell" C-m
185 tmux select-pane -t 1
186 tmux send-keys "clear" C-m
188 tmux send-keys "adb shell" C-m
191 tmux select-pane -t 2
192 tmux send-keys "clear" C-m
194 tmux send-keys "adb shell" C-m
199 tmux select-pane -t 1
200 tmux send-keys "PS1='[traced_probes]$ '" Enter
201 tmux send-keys "cd $DIR" Enter
202 tmux send-keys "$PREFIX ./traced $POSTFIX" Enter
204 tmux select-pane -t 0
205 tmux send-keys "PS1='[traced]$ '" Enter
206 tmux send-keys "cd $DIR" Enter
207 tmux send-keys "$PREFIX PERFETTO_METATRACE_FILE=mtrace ./traced_probes $POSTFIX" Enter
209 tmux select-pane -t 2
210 tmux send-keys "PS1='[consumer]$ '" Enter
211 tmux send-keys "cd $DIR" Enter
212 tmux send-keys "$PREFIX ./perfetto $CMD_OPTS -c $CONFIG_DEVICE_PATH -o trace $POSTFIX"
215 tmux select-pane -t 2
217 tmux -2 attach-session -t demo
218 if [[ background -eq 1 ]]; then
226 echo -e "\n\x1b[32mPulling trace into $TRACE.pbtext\x1b[0m"
228 echo -e "\n\x1b[32mPulling trace into $TRACE.json\x1b[0m"
234 sed -i -e '$ s/.$/]/' /tmp/mtrace.json
235 sed -i -e '1s/^/[/' /tmp/mtrace.json