linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 01/10] perf trace: Do not process PERF_RECORD_LOST twice
Date: Fri,  1 Apr 2016 18:56:57 -0300	[thread overview]
Message-ID: <1459547826-20100-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1459547826-20100-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

We catch this record to provide a visual indication that events are
getting lost, then call the default method to allow extra logging shared
with the other tools to take place.

This extra logging was done twice because we were continuing to the
"default" clause where machine__process_event() will end up calling
machine__process_lost_event() again, fix it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-wus2zlhw3qo24ye84ewu4aqw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 93ac724fb635..6485576f3337 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1618,6 +1618,7 @@ static int trace__process_event(struct trace *trace, struct machine *machine,
 		color_fprintf(trace->output, PERF_COLOR_RED,
 			      "LOST %" PRIu64 " events!\n", event->lost.lost);
 		ret = machine__process_lost_event(machine, event, sample);
+		break;
 	default:
 		ret = machine__process_event(machine, event, sample);
 		break;
-- 
2.5.5

  reply	other threads:[~2016-04-01 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 21:56 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-04-01 21:56 ` Arnaldo Carvalho de Melo [this message]
2016-04-01 21:56 ` [PATCH 02/10] perf trace: Pretty print seccomp() args Arnaldo Carvalho de Melo
2016-04-01 21:56 ` [PATCH 03/10] perf trace: Pretty print getrandom() args Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 04/10] perf tools: Add time conversion event Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 05/10] perf jit: Add support for using TSC as a timestamp Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 06/10] perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 07/10] perf tools: Fix PMU term format max value calculation Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 08/10] perf trace: Introduce function to set the base timestamp Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 09/10] perf trace: Don't set the base timestamp using events without PERF_SAMPLE_TIME Arnaldo Carvalho de Melo
2016-04-01 21:57 ` [PATCH 10/10] perf bpf: Add sample types for 'bpf-output' event Arnaldo Carvalho de Melo
2016-04-06  6:47 ` [GIT PULL 00/10] perf/core improvements and fixes Ingo Molnar

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=1459547826-20100-2-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /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).