perftool.py: more debug output and better pid selection for demo