argdist: Fix -p behavior to filter tgid and not pid
authorSasha Goldshtein <goldshtn@gmail.com>
Mon, 30 Jan 2017 11:08:12 +0000 (11:08 +0000)
committerSasha Goldshtein <goldshtn@gmail.com>
Mon, 30 Jan 2017 11:08:12 +0000 (11:08 +0000)
commit655e3c302ba39362be04bdab237b28814fe14b48
treeedc75cc2b2cf78e5e2b17a7ff4402b2c17d17f0a
parentb79b589a2dc663431e3a9489178c1ada6f12e8b7
argdist: Fix -p behavior to filter tgid and not pid

argdist remained one of the last holdouts to use the `-p` switch
inconsistently with other tools, filtering for kernel pid (thread
id from user space perspective) and not kernel tgid (process id
from user space perspective). This is now fixed.

Additionally, minor nits around generating pid filters were fixed,
and a potential collision with user-provided argument names was
fixed too (in general, script-generated arguments/locals should
probably stick to reserved identifiers, such as `__whatever` rather
than `whatever`).
tools/argdist.py