linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* possible regression in perf
@ 2023-12-11 18:00 trinity pointard
  2023-12-12 12:11 ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: trinity pointard @ 2023-12-11 18:00 UTC (permalink / raw)
  To: linux-perf-users

Hi,

I think I found a regression in perf related to the control fd.
At its introduction (bee328cb71eb0b38ab128d7c475209d973a13f92), it
looks like enabling or disabling counters would print the current
counters. However when `enable/disable <counter>` was introduced
(991ae4eb36911fe9a99bef1c22b9578ceec3896a), it changed what
`evlist__ctlfd_process()` would return on a successful enable/disable,
which made the call to `process_interval()` in `process_evlist()`
essentially dead code.

I was in the process of patching perf so that `snapshot` would print
current counters (in which case I would send enable, sleep a bit, and
send disable+snapshot, to do my measurements). But given what I saw, I
think just sending enable and disable was enough at one point.

Is this a known issue? Would a patch which makes
`evlist__ctlfd_enable()` return 1 on success be an acceptable fix?
It's somewhat more verbose than what I wanted initially (printing both
on enable and disable, printing on enable isn't useful to me), but
that's reasonably easy to post-process (or enable could be made to not
print current counters).

Regards,
trinity-1686a/trinity Pointard

P.S.: this is my first time posting to LKML, please tell me if I did
anything wrong :-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-14 23:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-11 18:00 possible regression in perf trinity pointard
2023-12-12 12:11 ` Jiri Olsa
2023-12-14 23:14   ` [PATCH] fix perf-stat regression printing stat on enable/disable trinity Pointard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).