public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for David Ahern <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
	eranian@google.com, hpa@zytor.com, mingo@kernel.org,
	peterz@infradead.org, namhyung@kernel.org, jolsa@redhat.com,
	fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de
Subject: [tip:perf/core] perf sched: Remove thread lookup in sample handler
Date: Thu, 15 Aug 2013 00:55:15 -0700	[thread overview]
Message-ID: <tip-ffb273dd7e3bd72e7d964fc0a0f6d441aceb7dae@git.kernel.org> (raw)
In-Reply-To: <1375930261-77273-4-git-send-email-dsahern@gmail.com>

Commit-ID:  ffb273dd7e3bd72e7d964fc0a0f6d441aceb7dae
Gitweb:     http://git.kernel.org/tip/ffb273dd7e3bd72e7d964fc0a0f6d441aceb7dae
Author:     David Ahern <dsahern@gmail.com>
AuthorDate: Wed, 7 Aug 2013 22:50:45 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 12 Aug 2013 10:31:06 -0300

perf sched: Remove thread lookup in sample handler

Not used in the function, so no sense in doing the lookup here. Thread
look up will be done in the timehist command, and no sense in doing it
twice.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1375930261-77273-4-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 34ce57d..5285024 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1425,15 +1425,8 @@ static int perf_sched__process_tracepoint_sample(struct perf_tool *tool __maybe_
 						 struct perf_evsel *evsel,
 						 struct machine *machine)
 {
-	struct thread *thread = machine__findnew_thread(machine, sample->tid);
 	int err = 0;
 
-	if (thread == NULL) {
-		pr_debug("problem processing %s event, skipping it.\n",
-			 perf_evsel__name(evsel));
-		return -1;
-	}
-
 	evsel->hists.stats.total_period += sample->period;
 	hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
 

  parent reply	other threads:[~2013-08-15  7:55 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08  2:50 [PATCH 00/19] perf sched: Add timehist subcommand David Ahern
2013-08-08  2:50 ` [PATCH 01/19] perf: sample after exit loses thread correlation - v3 David Ahern
2013-08-08 14:53   ` Arnaldo Carvalho de Melo
2013-08-08 20:42     ` David Ahern
2013-08-08 21:23       ` Arnaldo Carvalho de Melo
2013-08-08  2:50 ` [PATCH 02/19] perf sched: Simplify arguments to read_events David Ahern
2013-08-08 14:54   ` Arnaldo Carvalho de Melo
2013-08-15  7:55   ` [tip:perf/core] " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 03/19] perf sched: Remove thread lookup in sample handler David Ahern
2013-08-08 14:56   ` Arnaldo Carvalho de Melo
2013-08-15  7:55   ` tip-bot for David Ahern [this message]
2013-08-08  2:50 ` [PATCH 04/19] perf sched: Remove sched_process_exit tracepoint David Ahern
2013-08-08 14:57   ` Arnaldo Carvalho de Melo
2013-08-15  7:55   ` [tip:perf/core] " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 05/19] perf sched: Remove sched_process_fork tracepoint David Ahern
2013-08-08 15:00   ` Arnaldo Carvalho de Melo
2013-08-15  7:55   ` [tip:perf/core] " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 06/19] perf symbol: Add optimization for idle kernel symbols David Ahern
2013-08-08  2:50 ` [PATCH 07/19] perf top: Use new idle_sym check David Ahern
2013-08-08 15:06   ` Arnaldo Carvalho de Melo
2013-08-09  2:49     ` David Ahern
2013-08-09 13:53       ` Arnaldo Carvalho de Melo
2013-08-08  2:50 ` [PATCH 08/19] perf symbol: Save vmlinux or kallsyms path loaded David Ahern
2013-08-08 15:08   ` Arnaldo Carvalho de Melo
2013-08-09  2:51     ` David Ahern
2013-08-08  2:50 ` [PATCH 09/19] perf tool: Simplify options to perf_evsel__print_ip David Ahern
2013-08-08 15:14   ` Arnaldo Carvalho de Melo
2013-08-15  7:55   ` [tip:perf/core] " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 10/19] perf tool: Add option to print stack trace on single line David Ahern
2013-08-15  7:55   ` [tip:perf/core] perf evsel: " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 11/19] perf tool: Add option to limit stack depth in callchain dumps David Ahern
2013-08-15  7:56   ` [tip:perf/core] perf evsel: " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 12/19] perf tool: Add support for exclude symbol list to symbol_conf David Ahern
2013-08-08  2:50 ` [PATCH 13/19] perf tool: Skip symbols in exclude list while printing callchain David Ahern
2013-08-08  2:50 ` [PATCH 14/19] perf sched: pass event to evsel handlers using data element David Ahern
2013-08-08  2:50 ` [PATCH 15/19] perf sched: Add timehist command David Ahern
2013-08-08  2:50 ` [PATCH 16/19] perf tool: Change perf_session__has_traces to actually check for tracepoints David Ahern
2013-08-08 15:16   ` Arnaldo Carvalho de Melo
2013-08-15  7:56   ` [tip:perf/core] perf session: " tip-bot for David Ahern
2013-08-08  2:50 ` [PATCH 17/19] perf sched timehist: Add support for context-switch event David Ahern
2013-08-08  2:51 ` [PATCH 18/19] perf sched timehist: Print all events in verbose mode David Ahern
2013-08-08  2:51 ` [PATCH 19/19] perf sched timehist: Add pid/tid option David Ahern

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=tip-ffb273dd7e3bd72e7d964fc0a0f6d441aceb7dae@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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