mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
rtla: Count all processed events
Add a field processed_events to struct trace_instance and increment it in collect_registered_events, regardless of whether a handler is registered for the event. The purpose is to calculate the percentage of events that were missed due to tracefs buffer overflow. Cc: John Kacur <jkacur@redhat.com> Cc: Luis Goncalves <lgoncalv@redhat.com> Cc: Gabriele Monaco <gmonaco@redhat.com> Link: https://lore.kernel.org/20250123142339.990300-3-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
parent
d6fcd28ffe
commit
2aee44f721
|
|
@ -118,6 +118,8 @@ collect_registered_events(struct tep_event *event, struct tep_record *record,
|
|||
struct trace_instance *trace = context;
|
||||
struct trace_seq *s = trace->seq;
|
||||
|
||||
trace->processed_events++;
|
||||
|
||||
if (!event->handler)
|
||||
return 0;
|
||||
|
||||
|
|
@ -215,6 +217,8 @@ int trace_instance_init(struct trace_instance *trace, char *tool_name)
|
|||
collect_missed_events,
|
||||
trace);
|
||||
|
||||
trace->processed_events = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ struct trace_instance {
|
|||
struct tep_handle *tep;
|
||||
struct trace_seq *seq;
|
||||
unsigned long long missed_events;
|
||||
unsigned long long processed_events;
|
||||
};
|
||||
|
||||
int trace_instance_init(struct trace_instance *trace, char *tool_name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user