lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKTKpr4C8tbGpZaxTEFxc2hff=bbKkDcMRugm5XqDY3LgNHW6A@mail.gmail.com>
Date:   Tue, 5 Dec 2017 19:32:52 +0530
From:   Ganapatrao Kulkarni <gklkml16@...il.com>
To:     Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc:     "Jin, Yao" <yao.jin@...ux.intel.com>,
        Ganapatrao Kulkarni <ganapatrao.kulkarni@...ium.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Will Deacon <Will.Deacon@....com>, catalin.marinas@....com,
        mark.rutland@....com,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, jnair@...iumnetworks.com,
        Zhangshaokun <zhangshaokun@...ilicon.com>,
        Jonathan.Cameron@...wei.com,
        Robert Richter <Robert.Richter@...ium.com>,
        "Jin, Yao" <yao.jin@...el.com>
Subject: Re: [PATCH v9 3/5] perf utils: use pmu->is_uncore to detect PMU
 UNCORE devices

Hi Arnaldo,

On Tue, Dec 5, 2017 at 7:26 PM, Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
> Em Tue, Dec 05, 2017 at 08:35:22PM +0800, Jin, Yao escreveu:
>> A quick test with the new patch 'fix_json_v9_2.patch' shows it working.
>
> Where is this fix_json_v9_2.patch file? I want to fold it with the patch
> introducing the problem.

I will send you formal patch ASAP.

thanks
Ganapat

>
> - Arnaldo
>
>> See the log:
>>
>> root@skl:/tmp# perf stat --per-thread -p 10322 -M CPI,IPC
>> ^C
>>  Performance counter stats for process id '10322':
>>
>>           vmstat-10322             1,879,654      inst_retired.any #
>> 0.8 CPI
>>           vmstat-10322             1,565,807      cycles
>>           vmstat-10322             1,879,654      inst_retired.any #
>> 1.2 IPC
>>           vmstat-10322             1,565,807      cpu_clk_unhalted.thread
>>
>>        2.850291804 seconds time elapsed
>>
>> Thanks for fixing it quickly.
>>
>> Thanks
>> Jin Yao
>>
>> On 12/5/2017 3:23 PM, Jin, Yao wrote:
>> > Hi,
>> >
>> > I applied the diff but it's failed.
>> >
>> > jinyao@skl:~/skl-ws/perf-dev/lck-4594/src$ patch -p1 < 1.pat
>> > patching file tools/perf/util/pmu.c
>> > patch: **** malformed patch at line 41: *head, struct perf_pmu *pmu)
>> >
>> > Could you send the patch as attachment to me in another mail thread?
>> >
>> > to yao.jin@...ux.intel.com
>> > cc yao.jin@...el.com
>> >
>> > Thanks
>> > Jin Yao
>> >
>> > On 12/5/2017 3:12 PM, Ganapatrao Kulkarni wrote:
>> > > diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
>> > > index 5ad8a18..57e38fd 100644
>> > > --- a/tools/perf/util/pmu.c
>> > > +++ b/tools/perf/util/pmu.c
>> > > @@ -538,6 +538,34 @@ static bool pmu_is_uncore(const char *name)
>> > >   }
>> > >
>> > >   /*
>> > > + *  PMU CORE devices have different name other than cpu in sysfs on some
>> > > + *  platforms. looking for possible sysfs files to identify as core
>> > > device.
>> > > + */
>> > > +static int is_pmu_core(const char *name)
>> > > +{
>> > > + struct stat st;
>> > > + char path[PATH_MAX];
>> > > + const char *sysfs = sysfs__mountpoint();
>> > > +
>> > > + if (!sysfs)
>> > > + return 0;
>> > > +
>> > > + /* Look for cpu sysfs (x86 and others) */
>> > > + scnprintf(path, PATH_MAX, "%s/bus/event_source/devices/cpu", sysfs);
>> > > + if ((stat(path, &st) == 0) &&
>> > > + (strncmp(name, "cpu", strlen("cpu")) == 0))
>> > > + return 1;
>> > > +
>> > > + /* Look for cpu sysfs (specific to arm) */
>> > > + scnprintf(path, PATH_MAX, "%s/bus/event_source/devices/%s/cpus",
>> > > + sysfs, name);
>> > > + if (stat(path, &st) == 0)
>> > > + return 1;
>> > > +
>> > > + return 0;
>> > > +}
>> > > +
>> > > +/*
>> > >    * Return the CPU id as a raw string.
>> > >    *
>> > >    * Each architecture should provide a more precise id string that
>> > > @@ -641,7 +669,7 @@ static void pmu_add_cpu_aliases(struct list_head
>> > > *head, struct perf_pmu *pmu)
>> > >    break;
>> > >    }
>> > >
>> > > - if (pmu->is_uncore) {
>> > > + if (!is_pmu_core(name)) {
>> > >    /* check for uncore devices */
>> > >    if (pe->pmu == NULL)
>> > >    continue;

thanks
Ganapat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ