lkml.org 
[lkml]   [2023]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 5/5] hwtracing: hisi_ptt: Add dummy callback pmu::read()
From
On 19/09/2023 14:03, Yicong Yang wrote:
> On 2023/9/15 20:53, Suzuki K Poulose wrote:
>> On 14/09/2023 12:22, Yicong Yang wrote:
>>> From: Junhao He <hejunhao3@huawei.com>
>>>
>>> When start trace with perf option "-C $cpu" and immediately stop it
>>> with SIGTERM or others, the perf core will invoke pmu::read() while
>>> the driver doesn't implement it. Add a dummy pmu::read() to avoid
>>> any issues.
>>
>> What issues are we talking about here ? Shouldn't the core perf
>> skip the call, if pmu::read() is not available ?
>>
>
> Actually no, the core doesn't check it. So I think that's why some PMUs
> like SPE implements a dummy pmu::read() callback. Otherwise we'll
> dereference a NULL pointer.
>
> Currently we only met this on emulated platforms with very slow CPUs,
> follow the instructions in the commit above.

Ok, then it calls for a Fixes tag. Please tag it to the commit that
introduced the PMU.

Suzuki

\
 
 \ /
  Last update: 2023-09-19 19:13    [W:0.053 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site