From: Daniel Bristot de Oliveira <bristot@kernel.org>
To: Daniel Bristot de Oliveira <bristot@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Juri Lelli <juri.lelli@redhat.com>,
Clark Williams <williams@redhat.com>,
Bagas Sanjaya <bagasdotme@gmail.com>,
linux-trace-devel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH V2 2/6] rtla/osnoise: Add OSNOISE_IRQ_DISABLE option
Date: Tue, 31 Jan 2023 17:30:03 +0100 [thread overview]
Message-ID: <d374f5a6453ee54549fea44efee78b4dee646757.1675181734.git.bristot@kernel.org> (raw)
In-Reply-To: <cover.1675181734.git.bristot@kernel.org>
Add OSNOISE_IRQ_DISABLE to the set of possible options in the osnoise
context. Do not use it yet.
In preparation for the hwnoise tool.
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jonathan Corbet <corbet@lwn.net>
---
tools/tracing/rtla/src/osnoise.c | 6 ++++++
tools/tracing/rtla/src/osnoise.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/tools/tracing/rtla/src/osnoise.c b/tools/tracing/rtla/src/osnoise.c
index 050a9997191c..6bf877ed8a77 100644
--- a/tools/tracing/rtla/src/osnoise.c
+++ b/tools/tracing/rtla/src/osnoise.c
@@ -842,6 +842,8 @@ static void osnoise_put_##name(struct osnoise_context *context) \
context->orig_opt_##name = OSNOISE_OPTION_INIT_VAL; \
}
+OSNOISE_OPTION(irq_disable, "OSNOISE_IRQ_DISABLE");
+
/*
* enable_osnoise - enable osnoise tracer in the trace_instance
*/
@@ -906,6 +908,9 @@ struct osnoise_context *osnoise_context_alloc(void)
context->orig_tracing_thresh = OSNOISE_OPTION_INIT_VAL;
context->tracing_thresh = OSNOISE_OPTION_INIT_VAL;
+ context->orig_opt_irq_disable = OSNOISE_OPTION_INIT_VAL;
+ context->opt_irq_disable = OSNOISE_OPTION_INIT_VAL;
+
osnoise_get_context(context);
return context;
@@ -932,6 +937,7 @@ void osnoise_put_context(struct osnoise_context *context)
osnoise_put_timerlat_period_us(context);
osnoise_put_print_stack(context);
osnoise_put_tracing_thresh(context);
+ osnoise_put_irq_disable(context);
free(context);
}
diff --git a/tools/tracing/rtla/src/osnoise.h b/tools/tracing/rtla/src/osnoise.h
index 04a4384cc544..5bb0dc998f58 100644
--- a/tools/tracing/rtla/src/osnoise.h
+++ b/tools/tracing/rtla/src/osnoise.h
@@ -38,6 +38,10 @@ struct osnoise_context {
/* -1 as init value because 0 is disabled */
long long orig_print_stack;
long long print_stack;
+
+ /* -1 as init value because 0 is off */
+ int orig_opt_irq_disable;
+ int opt_irq_disable;
};
/*
@@ -79,6 +83,8 @@ void osnoise_restore_print_stack(struct osnoise_context *context);
int osnoise_set_print_stack(struct osnoise_context *context,
long long print_stack);
+int osnoise_set_irq_disable(struct osnoise_context *context, bool onoff);
+
/*
* osnoise_tool - osnoise based tool definition.
*/
--
2.38.1
next prev parent reply other threads:[~2023-01-31 16:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 16:30 [PATCH V2 0/6] rtla: Add hwnoise tool Daniel Bristot de Oliveira
2023-01-31 16:30 ` [PATCH V2 1/6] rtla/osnoise: Add helper functions to manipulate osnoise/options Daniel Bristot de Oliveira
2023-02-01 19:23 ` Steven Rostedt
2023-02-07 20:04 ` Daniel Bristot de Oliveira
2023-02-01 19:25 ` Steven Rostedt
2023-01-31 16:30 ` Daniel Bristot de Oliveira [this message]
2023-01-31 16:30 ` [PATCH V2 3/6] rtla/osnoise: Add the mode abstraction Daniel Bristot de Oliveira
2023-01-31 16:30 ` [PATCH V2 4/6] rtla/osnoise_top: Pass the params to the usage function Daniel Bristot de Oliveira
2023-01-31 16:30 ` [PATCH V2 5/6] rtla: Add hwnoise tool Daniel Bristot de Oliveira
2023-01-31 16:30 ` [PATCH V2 6/6] Documentation/rtla: Add hwnoise man page Daniel Bristot de Oliveira
2023-02-01 9:10 ` Bagas Sanjaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d374f5a6453ee54549fea44efee78b4dee646757.1675181734.git.bristot@kernel.org \
--to=bristot@kernel.org \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=juri.lelli@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).