diff options
| author | Adrian Hunter <adrian.hunter@intel.com> | 2018-03-07 09:02:26 -0500 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-08 08:05:57 -0500 |
| commit | 1c071c80d9661c263b043969fd92305037bf9773 (patch) | |
| tree | 45bc09cc42046b017a2a1917ef342924f9f2736a /tools/perf/util/intel-pt.c | |
| parent | 15d599a25c7649807a2b66f7100efcf030665068 (diff) | |
perf intel-pt: Get rid of intel_pt_use_buffer_pid_tid()
With the new way sampling support will be implemented,
intel_pt_use_buffer_pid_tid() will not be needed. Get rid of it.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1520431349-30689-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/intel-pt.c')
| -rw-r--r-- | tools/perf/util/intel-pt.c | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 0979a6e8b2b7..cfb3614f5def 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c | |||
| @@ -222,32 +222,6 @@ static int intel_pt_do_fix_overlap(struct intel_pt *pt, struct auxtrace_buffer * | |||
| 222 | return 0; | 222 | return 0; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | static void intel_pt_use_buffer_pid_tid(struct intel_pt_queue *ptq, | ||
| 226 | struct auxtrace_queue *queue, | ||
| 227 | struct auxtrace_buffer *buffer) | ||
| 228 | { | ||
| 229 | if (queue->cpu == -1 && buffer->cpu != -1) | ||
| 230 | ptq->cpu = buffer->cpu; | ||
| 231 | |||
| 232 | ptq->pid = buffer->pid; | ||
| 233 | ptq->tid = buffer->tid; | ||
| 234 | |||
| 235 | intel_pt_log("queue %u cpu %d pid %d tid %d\n", | ||
| 236 | ptq->queue_nr, ptq->cpu, ptq->pid, ptq->tid); | ||
| 237 | |||
| 238 | thread__zput(ptq->thread); | ||
| 239 | |||
| 240 | if (ptq->tid != -1) { | ||
| 241 | if (ptq->pid != -1) | ||
| 242 | ptq->thread = machine__findnew_thread(ptq->pt->machine, | ||
| 243 | ptq->pid, | ||
| 244 | ptq->tid); | ||
| 245 | else | ||
| 246 | ptq->thread = machine__find_thread(ptq->pt->machine, -1, | ||
| 247 | ptq->tid); | ||
| 248 | } | ||
| 249 | } | ||
| 250 | |||
| 251 | /* This function assumes data is processed sequentially only */ | 225 | /* This function assumes data is processed sequentially only */ |
| 252 | static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data) | 226 | static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data) |
| 253 | { | 227 | { |
| @@ -311,10 +285,6 @@ next: | |||
| 311 | b->consecutive = true; | 285 | b->consecutive = true; |
| 312 | } | 286 | } |
| 313 | 287 | ||
| 314 | if (ptq->use_buffer_pid_tid && (ptq->pid != buffer->pid || | ||
| 315 | ptq->tid != buffer->tid)) | ||
| 316 | intel_pt_use_buffer_pid_tid(ptq, queue, buffer); | ||
| 317 | |||
| 318 | if (ptq->step_through_buffers) | 288 | if (ptq->step_through_buffers) |
| 319 | ptq->stop = true; | 289 | ptq->stop = true; |
| 320 | 290 | ||
| @@ -958,12 +928,9 @@ static int intel_pt_setup_queue(struct intel_pt *pt, | |||
| 958 | ptq->cpu = queue->cpu; | 928 | ptq->cpu = queue->cpu; |
| 959 | ptq->tid = queue->tid; | 929 | ptq->tid = queue->tid; |
| 960 | 930 | ||
| 961 | if (pt->sampling_mode) { | 931 | if (pt->sampling_mode && !pt->snapshot_mode && |
| 962 | if (pt->timeless_decoding) | 932 | pt->timeless_decoding) |
| 963 | ptq->step_through_buffers = true; | 933 | ptq->step_through_buffers = true; |
| 964 | if (pt->timeless_decoding || !pt->have_sched_switch) | ||
| 965 | ptq->use_buffer_pid_tid = true; | ||
| 966 | } | ||
| 967 | 934 | ||
| 968 | ptq->sync_switch = pt->sync_switch; | 935 | ptq->sync_switch = pt->sync_switch; |
| 969 | } | 936 | } |
