linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 6/9] perf intel-pt: Get rid of intel_pt_use_buffer_pid_tid()
Date: Wed,  7 Mar 2018 16:02:26 +0200	[thread overview]
Message-ID: <1520431349-30689-7-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1520431349-30689-1-git-send-email-adrian.hunter@intel.com>

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>
---
 tools/perf/util/intel-pt.c | 39 +++------------------------------------
 1 file 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 *
 	return 0;
 }
 
-static void intel_pt_use_buffer_pid_tid(struct intel_pt_queue *ptq,
-					struct auxtrace_queue *queue,
-					struct auxtrace_buffer *buffer)
-{
-	if (queue->cpu == -1 && buffer->cpu != -1)
-		ptq->cpu = buffer->cpu;
-
-	ptq->pid = buffer->pid;
-	ptq->tid = buffer->tid;
-
-	intel_pt_log("queue %u cpu %d pid %d tid %d\n",
-		     ptq->queue_nr, ptq->cpu, ptq->pid, ptq->tid);
-
-	thread__zput(ptq->thread);
-
-	if (ptq->tid != -1) {
-		if (ptq->pid != -1)
-			ptq->thread = machine__findnew_thread(ptq->pt->machine,
-							      ptq->pid,
-							      ptq->tid);
-		else
-			ptq->thread = machine__find_thread(ptq->pt->machine, -1,
-							   ptq->tid);
-	}
-}
-
 /* This function assumes data is processed sequentially only */
 static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
 {
@@ -311,10 +285,6 @@ static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
 		b->consecutive = true;
 	}
 
-	if (ptq->use_buffer_pid_tid && (ptq->pid != buffer->pid ||
-					ptq->tid != buffer->tid))
-		intel_pt_use_buffer_pid_tid(ptq, queue, buffer);
-
 	if (ptq->step_through_buffers)
 		ptq->stop = true;
 
@@ -958,12 +928,9 @@ static int intel_pt_setup_queue(struct intel_pt *pt,
 			ptq->cpu = queue->cpu;
 		ptq->tid = queue->tid;
 
-		if (pt->sampling_mode) {
-			if (pt->timeless_decoding)
-				ptq->step_through_buffers = true;
-			if (pt->timeless_decoding || !pt->have_sched_switch)
-				ptq->use_buffer_pid_tid = true;
-		}
+		if (pt->sampling_mode && !pt->snapshot_mode &&
+		    pt->timeless_decoding)
+			ptq->step_through_buffers = true;
 
 		ptq->sync_switch = pt->sync_switch;
 	}
-- 
1.9.1

  parent reply	other threads:[~2018-03-07 14:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 14:02 [PATCH 0/9] perf intel-pt: Some fixes and preparation for AUX area sampling Adrian Hunter
2018-03-07 14:02 ` [PATCH 1/9] perf intel-pt: Fix overlap detection to identify consecutive buffers correctly Adrian Hunter
2018-03-09  8:47   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 2/9] perf intel-pt: Fix sync_switch Adrian Hunter
2018-03-09  8:47   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 3/9] perf intel-pt: Fix error recovery from missing TIP packet Adrian Hunter
2018-03-09  8:48   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 4/9] perf intel-pt: Fix timestamp following overflow Adrian Hunter
2018-03-09  8:48   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 5/9] perf intel-pt/bts: In auxtrace_record__init_intel() evlist is never NULL Adrian Hunter
2018-03-09  8:49   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` Adrian Hunter [this message]
2018-03-09  8:49   ` [tip:perf/core] perf intel-pt: Get rid of intel_pt_use_buffer_pid_tid() tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 7/9] perf intel-pt: Tidy old_buffer handling in intel_pt_get_trace() Adrian Hunter
2018-03-09  8:50   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 8/9] perf intel-pt: Remove a check for sampling mode Adrian Hunter
2018-03-09  8:50   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:02 ` [PATCH 9/9] perf intel-pt: Adjust overlap-checking to support " Adrian Hunter
2018-03-09  8:51   ` [tip:perf/core] " tip-bot for Adrian Hunter
2018-03-07 14:36 ` [PATCH 0/9] perf intel-pt: Some fixes and preparation for AUX area sampling Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520431349-30689-7-git-send-email-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).