Changed how pre processing commands are issued & added fix_tgids opt.

Replaced the old method of issuing pre processing commands to the device
in the same popen call, then matching on regular expressions to extract
the data. Now for each pre processing command the command is sent in its
own popen call and has its own parsing function.

Added code to look for tgis in procfs on the device. The kernel
provides a mechanism to map TGIDS to PIDs but the buffer easily gets
overrun. This is a host side fix to try and patch up as many missing
TGIDS as possible
10 files changed