Skip to content

Commit a5f6d2d

Browse files
committed
Bug 1184949 - Allow profiling thread names with spaces.
Flattening an argument list into a string is a bad idea; instead use `"$@"` double-quoted to pass it as-is without whitespace splitting, and `$#` to check the argument count.
1 parent d8d15e9 commit a5f6d2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

profile.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,10 +642,9 @@ HELP_start="Starts the profiler. -p [process] -e [entries] -s [stack scan mode]
642642
-i [interval] -m [profiler mode] -f [features] -t [threads].
643643
e.g. ./profile.sh start -p b2g -t Compositor -i 1"
644644
cmd_start() {
645-
args=$@
646-
if [ -n "$args" ]
645+
if [ $# -gt 0 ]
647646
then
648-
start_with_args $args
647+
start_with_args "$@"
649648
else
650649
stop_b2g
651650
remove_profile_files

0 commit comments

Comments
 (0)