poor man's profiler based on ptrace