All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 4/4] perf test: Validate PERF_RECORD_ events and perf_sample fields
Date: Fri, 02 Dec 2011 10:07:56 -0700	[thread overview]
Message-ID: <4ED905EC.80700@gmail.com> (raw)
In-Reply-To: <1322842769-7232-5-git-send-email-acme@infradead.org>



On 12/02/2011 09:19 AM, Arnaldo Carvalho de Melo wrote:
> +found_exit:
> +	if (nr_events[PERF_RECORD_COMM] > 1) {
> +		pr_debug("Excessive number of PERF_RECORD_COMM events!\n");
> +		goto out_err;
> +	}
> +
> +	if (nr_events[PERF_RECORD_COMM] == 0) {
> +		pr_debug("Missing PERF_RECORD_COMM for %s!\n", cmd);
> +		goto out_err;
> +	}
> +
> +	if (!found_cmd_mmap) {
> +		pr_debug("PERF_RECORD_MMAP for %s missing!\n", cmd);
> +		goto out_err;
> +	}
> +
> +	if (!found_libc_mmap) {
> +		pr_debug("PERF_RECORD_MMAP for %s missing!\n", "libc");
> +		goto out_err;
> +	}
> +
> +	if (!found_ld_mmap) {
> +		pr_debug("PERF_RECORD_MMAP for %s missing!\n", "ld");
> +		goto out_err;
> +	}
> +
> +	if (!found_vdso_mmap) {
> +		pr_debug("PERF_RECORD_MMAP for %s missing!\n", "[vdso]");
> +		goto out_err;
> +	}


Since this is a test why not show all missed events rather than punt to
out_err on the first missed one?

David


> +
> +	err = 0;
> +out_err:
> +	perf_evlist__munmap(evlist);
> +out_free_cpu_mask:
> +	CPU_FREE(cpu_mask);
> +out_delete_evlist:
> +	perf_evlist__delete(evlist);
> +out:
> +	return err;
> +}
> +

  parent reply	other threads:[~2011-12-02 17:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 16:19 [GIT PULL 0/4] perf test improvements Arnaldo Carvalho de Melo
2011-12-02 16:19 ` [PATCH 1/4] perf evlist: Always do automatic allocation of pollfd and mmap structures Arnaldo Carvalho de Melo
2011-12-02 16:19 ` [PATCH 2/4] perf test: Allow running just a subset of the available tests Arnaldo Carvalho de Melo
2011-12-02 16:19 ` [PATCH 3/4] perf event: Introduce perf_event__fprintf Arnaldo Carvalho de Melo
2011-12-02 16:19 ` [PATCH 4/4] perf test: Validate PERF_RECORD_ events and perf_sample fields Arnaldo Carvalho de Melo
2011-12-02 17:07   ` David Ahern
2011-12-02 19:06     ` Arnaldo Carvalho de Melo
2011-12-02 17:07   ` David Ahern [this message]
2011-12-02 16:54 ` [GIT PULL 0/4] perf test improvements David Ahern
2011-12-02 18:22   ` Arnaldo Carvalho de Melo
2011-12-05 15:46     ` Ingo Molnar
2011-12-05  9:22 ` 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=4ED905EC.80700@gmail.com \
    --to=dsahern@gmail.com \
    --cc=acme@ghostprotocols.net \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.