title: How do I sample all threads and record their thread id with perf?
body: <p>I want to get information about what each thread is doing at regular intervals. Unfortunately I can see in the <code>perf script</code> output that no thread id is recorded, because the output looks the same with <code>-F +tid</code> as with <code>-F -tid</code>.</p>
  <p>I tried using the <code>--per-thread</code> option but it doesn't do what I want. Instead, it seems to drop the timestamp field from the data.</p>
  <p>Is this possible? If not, what does the data reported by <code>perf</code> for a multithreaded program mean – does it just sample the main thread, or random threads?</p>