From patchwork Thu Jan 23 14:23:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Glozar X-Patchwork-Id: 13948309 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16C0913212A for ; Thu, 23 Jan 2025 14:24:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642254; cv=none; b=PHpOeBAx3BghfBBaK21Q/agXt3oU4dqaejr363FF5NNbNZC3KVmbGeBellrujP32I/yw2Zz5iQrT4wKDiKDjUvP+AYy6FmFU9/mXEn/Jn6irHrODsimROQN5E2Mv0AUKjgGUaaQRyEChdg39RWmJI9uYWccdDMGsvu5o1B0FEP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642254; c=relaxed/simple; bh=IMohP4nxXlXpvOvpPlcm3f2VRVU7gg21gutf8vCNX1I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AvSda6nUmKhQv1cbqMXL2toQ9+3OT4mmepSbiZ6hUENLyddoDQJfZN+/cehISrek1MaZPD3a/YMblAJ0ZriR8nHqrn5HURSC1vrsQHABuN+TLVBjWnM131nh6Ac22MYUFfzE5cB6zDe99U6VYhpaszn8HFc84VRQA/uubJnVERQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gnojQxqm; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gnojQxqm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737642252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dT4dlQp+Wmdsq5JvY+uN/CXCmgnXpF4Xhn6I+amVfBY=; b=gnojQxqmNHIVQ4yiYX8MIGiSlVzHn0XPgwfnBzw8BGcPsxpqnPMeOAZ8LsgYkRp7uZsXAK CNxMU2yr1CwHt5vPFFBk0Okz8xy0GyvI3eI+Z0sQ9Gs5Z/5fiVVyvQFJ8h2rashrC1ZiGY b+Q7XHFCOpiXOENHRkkADxpT/9URbd0= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-JFJCiLfrNQGIe-wGsz9zNQ-1; Thu, 23 Jan 2025 09:24:07 -0500 X-MC-Unique: JFJCiLfrNQGIe-wGsz9zNQ-1 X-Mimecast-MFC-AGG-ID: JFJCiLfrNQGIe-wGsz9zNQ Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4E231955E79; Thu, 23 Jan 2025 14:24:06 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.159]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C360819560B7; Thu, 23 Jan 2025 14:24:04 +0000 (UTC) From: Tomas Glozar To: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, John Kacur , Luis Goncalves , Gabriele Monaco , Tomas Glozar Subject: [PATCH 1/4] rtla: Count missed trace events Date: Thu, 23 Jan 2025 15:23:36 +0100 Message-ID: <20250123142339.990300-2-tglozar@redhat.com> In-Reply-To: <20250123142339.990300-1-tglozar@redhat.com> References: <20250123142339.990300-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Add function collect_missed_events to trace.c to act as a callback for tracefs_follow_missed_events, summing the number of total missed events into a new field missing_events of struct trace_instance. In case record->missed_events is negative, trace->missed_events is set to UINT64_MAX to signify an unknown number of events was missed. The callback is activated on initialization of the trace instance. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/trace.c | 34 ++++++++++++++++++++++++++++++++++ tools/tracing/rtla/src/trace.h | 1 + 2 files changed, 35 insertions(+) diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c index 170a706248ab..69a6bd2b3746 100644 --- a/tools/tracing/rtla/src/trace.c +++ b/tools/tracing/rtla/src/trace.c @@ -126,6 +126,31 @@ collect_registered_events(struct tep_event *event, struct tep_record *record, return 0; } +/* + * collect_missed_events - record number of missed events + * + * If rtla cannot keep up with events generated by tracer, events are going + * to fall out of the ring buffer. + * Collect how many events were missed so it can be reported to the user. + */ +static int +collect_missed_events(struct tep_event *event, struct tep_record *record, + int cpu, void *context) +{ + struct trace_instance *trace = context; + + if (trace->missed_events == UINT64_MAX) + return 0; + + if (record->missed_events > 0) + trace->missed_events += record->missed_events; + else + /* Events missed but no data on how many */ + trace->missed_events = UINT64_MAX; + + return 0; +} + /* * trace_instance_destroy - destroy and free a rtla trace instance */ @@ -181,6 +206,15 @@ int trace_instance_init(struct trace_instance *trace, char *tool_name) */ tracefs_trace_off(trace->inst); + /* + * Collect the number of events missed due to tracefs buffer + * overflow. + */ + trace->missed_events = 0; + tracefs_follow_missed_events(trace->inst, + collect_missed_events, + trace); + return 0; out_err: diff --git a/tools/tracing/rtla/src/trace.h b/tools/tracing/rtla/src/trace.h index c7c92dc9a18a..027cb66f5604 100644 --- a/tools/tracing/rtla/src/trace.h +++ b/tools/tracing/rtla/src/trace.h @@ -17,6 +17,7 @@ struct trace_instance { struct tracefs_instance *inst; struct tep_handle *tep; struct trace_seq *seq; + unsigned long long missed_events; }; int trace_instance_init(struct trace_instance *trace, char *tool_name); From patchwork Thu Jan 23 14:23:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Glozar X-Patchwork-Id: 13948310 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D181F212B06 for ; Thu, 23 Jan 2025 14:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642257; cv=none; b=GrCP9es0qrJHrrnSrhXlb0AETcPQnaH6ysD/3xPnTMirtMjCBuzWbXxLb7QMF03cpvhl/k4Rj/120xflfWHUI8CHKa7pyJ29O8ULPZ7KbC4FDVOMySwp4pBeKOhy9h4qFcHiJOTBzJQLJ78HytTlzM2lctW7R5vMq7vQuLCWw2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642257; c=relaxed/simple; bh=KFacXVY20Z1ZBEoE3aEgahE48ouQmhHcclOIAicpfuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DQZYI/vjrQDSl24wf7s9gRlZjo+azWNnY3OZN7hBcP9SbRSPiXnDjBgb0Bfgz8mPyapecO3d488i2Ti4iQ1h1MW3Eanqe2mPE1SVNciftd32hPROCROp6jOA80OaUmFRvSxxG3ZDFt94wn3TLMIB8UsexH/QHsJgppXiSvUI7FM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jAHtVnxQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jAHtVnxQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737642254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E46xhR1nOOiB1w8q52hc3gVyDXW6MKx7w+hnQxPf0/U=; b=jAHtVnxQ4sPGnvQuOb3UsN5fqm5gC8rNFxAZD+6w9PGGj+kdtGJa0c38kau8053Mc8nwIp fkLcGZhRC/3IlKz3YjnXLNXil8Qzi/gXp3PIkJDWgKWc/fD/t8W7qoPBs7g593cFO1GhQb lFSqXhJjzW5FH3cvfNxHmDS3GZs6dAY= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-In4myt4jNmuX8EryDf4ygQ-1; Thu, 23 Jan 2025 09:24:11 -0500 X-MC-Unique: In4myt4jNmuX8EryDf4ygQ-1 X-Mimecast-MFC-AGG-ID: In4myt4jNmuX8EryDf4ygQ Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 72B6719560B3; Thu, 23 Jan 2025 14:24:10 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.159]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 569E9195E3D9; Thu, 23 Jan 2025 14:24:07 +0000 (UTC) From: Tomas Glozar To: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, John Kacur , Luis Goncalves , Gabriele Monaco , Tomas Glozar Subject: [PATCH 2/4] rtla: Count all processed events Date: Thu, 23 Jan 2025 15:23:37 +0100 Message-ID: <20250123142339.990300-3-tglozar@redhat.com> In-Reply-To: <20250123142339.990300-1-tglozar@redhat.com> References: <20250123142339.990300-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 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 percentange of events that were missed due to tracefs buffer overflow. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/trace.c | 4 ++++ tools/tracing/rtla/src/trace.h | 1 + 2 files changed, 5 insertions(+) diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c index 69a6bd2b3746..b9c4b6c2ce79 100644 --- a/tools/tracing/rtla/src/trace.c +++ b/tools/tracing/rtla/src/trace.c @@ -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: diff --git a/tools/tracing/rtla/src/trace.h b/tools/tracing/rtla/src/trace.h index 027cb66f5604..2fd96cf36ce7 100644 --- a/tools/tracing/rtla/src/trace.h +++ b/tools/tracing/rtla/src/trace.h @@ -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); From patchwork Thu Jan 23 14:23:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Glozar X-Patchwork-Id: 13948311 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40473212B35 for ; Thu, 23 Jan 2025 14:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642259; cv=none; b=LmIoaUwO8l3SvEIZ9vybkJcIrngQwJWH2jR94qnDIW9hXv4dWcMQRx6tzTQDCtHB2kf9kco2JN9OOc602UGZg1nUnEW7SejW/ooT/v3JXJEH99SHJjYQS08e+f9ia5RIm6bD2nAteJOJD+SBRrU2mii4UVubg+P/ZaRiQeby7W4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642259; c=relaxed/simple; bh=1D/ucQMoB2M/CHqDppJhDu+2Sta44h7HmcEkMLXLK0o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=do6cY+1RBQMpIwg+WHmwHN7RXssYZavrbB43PtHNNPrD4XwLUcsaeWdMXw+4eN1rhJassqpv2mIW5KidpFNa3HCJLkHBTFSh+vNTuyNSBaC5txmUTbqxfbUFB3BBwH+g4HBYYVRh7QkbLMnd0oelK8jgJx6aXvxw/znT/fpDM4Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=anGXBW0B; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="anGXBW0B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737642257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xr3HA6KK95LL58cJ/DRUd0E8EbP8cIddfYBa+I+9Yiw=; b=anGXBW0BnlfSenUIr6/Y9aNIRE04PFQDEeLQlz6Sw6Hh2nR6ITwszJbYrWlYe9GQCLg0CG /R8nRkK33LF9Z+Uwj9o24HEdrHyO0iukJ8lolx4G7SP6bgVcVZaFfE7lt3GiWh7JSMzbl1 +VmxcEuYiz4V/jDgg6ADfjA6JfIelXU= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-yCw5pvJ_PFKeVthyilPqPg-1; Thu, 23 Jan 2025 09:24:13 -0500 X-MC-Unique: yCw5pvJ_PFKeVthyilPqPg-1 X-Mimecast-MFC-AGG-ID: yCw5pvJ_PFKeVthyilPqPg Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 023BB1956065; Thu, 23 Jan 2025 14:24:13 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.159]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E8613195608A; Thu, 23 Jan 2025 14:24:10 +0000 (UTC) From: Tomas Glozar To: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, John Kacur , Luis Goncalves , Gabriele Monaco , Tomas Glozar Subject: [PATCH 3/4] rtla: Add function to report missed events Date: Thu, 23 Jan 2025 15:23:38 +0100 Message-ID: <20250123142339.990300-4-tglozar@redhat.com> In-Reply-To: <20250123142339.990300-1-tglozar@redhat.com> References: <20250123142339.990300-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Add osnoise_report_missed_events to be used to report the number of missed events either during or after an osnoise or timerlat run. Also, display the percentage of missed events compared to the total number of received events. If an unknown number of missed events was reported during the run, the entire number of missed events is reported as unknown. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/osnoise.c | 20 ++++++++++++++++++++ tools/tracing/rtla/src/osnoise.h | 1 + 2 files changed, 21 insertions(+) diff --git a/tools/tracing/rtla/src/osnoise.c b/tools/tracing/rtla/src/osnoise.c index 245e9344932b..eede5e01bff6 100644 --- a/tools/tracing/rtla/src/osnoise.c +++ b/tools/tracing/rtla/src/osnoise.c @@ -1079,6 +1079,26 @@ struct osnoise_tool *osnoise_init_trace_tool(char *tracer) return NULL; } +/* + * osnoise_report_missed_events - report number of events dropped by trace + * buffer + */ +void +osnoise_report_missed_events(struct osnoise_tool *tool) +{ + unsigned long long total_events; + + if (tool->trace.missed_events == UINT64_MAX) + printf("unknown number of events missed, results might not be accurate\n"); + else if (tool->trace.missed_events > 0) { + total_events = tool->trace.processed_events + tool->trace.missed_events; + + printf("%lld (%.2f%%) events missed, results might not be accurate\n", + tool->trace.missed_events, + (double) tool->trace.missed_events / total_events * 100.0); + } +} + static void osnoise_usage(int err) { int i; diff --git a/tools/tracing/rtla/src/osnoise.h b/tools/tracing/rtla/src/osnoise.h index 555f4f4903cc..43e4b7bb7f4a 100644 --- a/tools/tracing/rtla/src/osnoise.h +++ b/tools/tracing/rtla/src/osnoise.h @@ -104,6 +104,7 @@ struct osnoise_tool { void osnoise_destroy_tool(struct osnoise_tool *top); struct osnoise_tool *osnoise_init_tool(char *tool_name); struct osnoise_tool *osnoise_init_trace_tool(char *tracer); +void osnoise_report_missed_events(struct osnoise_tool *tool); int osnoise_hist_main(int argc, char *argv[]); int osnoise_top_main(int argc, char **argv); From patchwork Thu Jan 23 14:23:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Glozar X-Patchwork-Id: 13948312 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9F6D212B3B for ; Thu, 23 Jan 2025 14:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642260; cv=none; b=XgA2HjKxy1Ik9CqdNPu8x/jybllrI5/aWcQR/PB51/VSotzymQ0ubj6GJCIWGk6gBbKCFCiN6lUbaJMo+xF0OoLZL8Qtt3u/Bj007QUNpOOqDmOpCqnhO5Up9+/lnrpm5eOyOXZAfNy+LZMhJqo+THZqCZF/GvRr0hJnVzkhWns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737642260; c=relaxed/simple; bh=vzV1pu569wUAZZPK2GM3xIcUxpgyTnYsnbHAqylWgVM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VCZtgSDAV/xKrv1/41bTryjFnNv/xiZ1eXkRiBVjayMSWl2HrKfTw+YWU4klLktcYytbYSVnXlQ2e/HDwvIEzoMBzcwnk0qQEsNY/5qqeMrIcDjTlgnhWhV4Wj+BHEJtKENrvkXp6bbF7L+D34E27Yuu64bL8X3h9iM/36eDyUw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=J65kmbWo; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="J65kmbWo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737642257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vhEbJ0twsd+a13mE/uEYxjwrWT3AcdPk5UPVwuPtOrE=; b=J65kmbWor1OlCNxNtabHEgVxc1B9ZVphTFSpH29KPALnVhB8bfXiMYX27V5wX+NJWiTIUJ ADMPumotYmvf5wmo3hyynDjfrAiHz2hGmQZ71ZTd+O1qzvs/qUS2x9gLECBcdhgVx1WIcz MIPYIgmJd3BGgmapt/rSyq+xpYluGzI= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-OUpqexOXM2qDqRPhMcYNVw-1; Thu, 23 Jan 2025 09:24:16 -0500 X-MC-Unique: OUpqexOXM2qDqRPhMcYNVw-1 X-Mimecast-MFC-AGG-ID: OUpqexOXM2qDqRPhMcYNVw Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 90E261955DCF; Thu, 23 Jan 2025 14:24:15 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.159]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6AD28195608A; Thu, 23 Jan 2025 14:24:13 +0000 (UTC) From: Tomas Glozar To: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, John Kacur , Luis Goncalves , Gabriele Monaco , Tomas Glozar Subject: [PATCH 4/4] rtla: Report missed event count Date: Thu, 23 Jan 2025 15:23:39 +0100 Message-ID: <20250123142339.990300-5-tglozar@redhat.com> In-Reply-To: <20250123142339.990300-1-tglozar@redhat.com> References: <20250123142339.990300-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Print how many events were missed by trace buffer overflow in the main instance at the end of the run (for hist) or during the run (for top). Signed-off-by: Tomas Glozar Tested-by: Gabriele Monaco --- tools/tracing/rtla/src/osnoise_hist.c | 1 + tools/tracing/rtla/src/osnoise_top.c | 1 + tools/tracing/rtla/src/timerlat_hist.c | 1 + tools/tracing/rtla/src/timerlat_top.c | 1 + 4 files changed, 4 insertions(+) diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c index 214e2c93fde0..21376c00bcb3 100644 --- a/tools/tracing/rtla/src/osnoise_hist.c +++ b/tools/tracing/rtla/src/osnoise_hist.c @@ -440,6 +440,7 @@ osnoise_print_stats(struct osnoise_hist_params *params, struct osnoise_tool *too trace_seq_reset(trace->seq); osnoise_print_summary(params, trace, data); + osnoise_report_missed_events(tool); } /* diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c index 45647495ce3b..3d3daf12538d 100644 --- a/tools/tracing/rtla/src/osnoise_top.c +++ b/tools/tracing/rtla/src/osnoise_top.c @@ -280,6 +280,7 @@ osnoise_print_stats(struct osnoise_top_params *params, struct osnoise_tool *top) trace_seq_do_printf(trace->seq); trace_seq_reset(trace->seq); + osnoise_report_missed_events(top); } /* diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c index 4403cc4eba30..c18b3456a3d5 100644 --- a/tools/tracing/rtla/src/timerlat_hist.c +++ b/tools/tracing/rtla/src/timerlat_hist.c @@ -656,6 +656,7 @@ timerlat_print_stats(struct timerlat_hist_params *params, struct osnoise_tool *t timerlat_print_summary(params, trace, data); timerlat_print_stats_all(params, trace, data); + osnoise_report_missed_events(tool); } /* diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c index 059b468981e4..8869a0988955 100644 --- a/tools/tracing/rtla/src/timerlat_top.c +++ b/tools/tracing/rtla/src/timerlat_top.c @@ -435,6 +435,7 @@ timerlat_print_stats(struct timerlat_top_params *params, struct osnoise_tool *to trace_seq_do_printf(trace->seq); trace_seq_reset(trace->seq); + osnoise_report_missed_events(top); } /*