Thread (14 messages) 14 messages, 3 authors, 2023-09-20

Re: [PATCH V5 - RESEND 2/3] coresight: etm: Make cycle count threshold user configurable

From: Anshuman Khandual <hidden>
Date: 2023-09-20 10:45:43
Also in: linux-doc, lkml


On 9/20/23 14:52, Suzuki K Poulose wrote:
On 15/09/2023 10:36, Anshuman Khandual wrote:
quoted
Cycle counting is enabled, when requested and supported but with a default
threshold value ETM_CYC_THRESHOLD_DEFAULT i.e 0x100 getting into TRCCCCTLR,
representing the minimum interval between cycle count trace packets.
minor nit:

When Cycle counting is enabled, we use a default threshold value (0x100) for the instruction trace cycle counting.
quoted
This makes cycle threshold user configurable, from the user space via perf
event attributes. Although it falls back using ETM_CYC_THRESHOLD_DEFAULT,
in case no explicit request.
Minor nit:

This patch makes the cycle threshold user configurable via perf event
attributes( 'cc_threshold' => event->attr.config3[11:0] ), falling back
to the the current default if unspecified.


quoted
As expected it creates a sysfs file as well.
quoted
/sys/bus/event_source/devices/cs_etm/format/cc_threshold

New 'cc_threshold' uses 'event->attr.config3' as no more space is available
in 'event->attr.config1' or 'event->attr.config2'.
Trim the above part.


Rest looks fine to me.
Will change the commit message as follows.


    coresight: etm: Make cycle count threshold user configurable
    
    When cycle counting is enabled, we use a default threshold value i.e 0x100
    for the instruction trace cycle counting.
    
    This patch makes the cycle threshold user configurable via perf event
    attributes( 'cc_threshold' => event->attr.config3[11:0] ), falling back
    to the current default if unspecified.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help