lkml.org 
[lkml]   [2011]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/4] perf test: Validate PERF_RECORD_ events and perf_sample fields


    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;
    > +}
    > +


    \
     
     \ /
      Last update: 2011-12-02 18:11    [W:0.021 / U:1.740 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site