linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 1/4] trace-cruncher: Add set_ftrace_loglevel()
Date: Mon, 26 Jul 2021 12:34:20 +0300	[thread overview]
Message-ID: <b65d92d5-4978-a9c1-e04d-52f58638d8c5@gmail.com> (raw)
In-Reply-To: <20210722171551.6a640651@oasis.local.home>



On 23.07.21 г. 0:15, Steven Rostedt wrote:
> On Mon, 12 Jul 2021 15:32:39 +0300
> "Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:
> 
> -ENOCOMMITMESSAGE
> 
> Please describe what you are doing and why. The subject is not enough.
> 
> Even on simple changes, there should be some commentary.

There was a message for this commit. I guess I somehow deleted it with 
the last rebase. Will fix this in v2.

Thanks!
Yordan

> The rest looks fine.
> 
> -- Steve
> 
> 
>> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
>> ---
>>   src/ftracepy-utils.c | 23 +++++++++++++++++++++++
>>   src/ftracepy-utils.h |  3 +++
>>   src/ftracepy.c       |  5 +++++
>>   3 files changed, 31 insertions(+)
>>
>> diff --git a/src/ftracepy-utils.c b/src/ftracepy-utils.c
>> index dfb0669..8f4b50c 100644
>> --- a/src/ftracepy-utils.c
>> +++ b/src/ftracepy-utils.c
>> @@ -1801,6 +1801,29 @@ PyObject *PyFtrace_kprobe_is_enabled(PyObject *self, PyObject *args,
>>   	return event_is_enabled(instance, TC_SYS, event);
>>   }
>>   
>> +PyObject *PyFtrace_set_ftrace_loglevel(PyObject *self, PyObject *args,
>> +						       PyObject *kwargs)
>> +{
>> +	static char *kwlist[] = {"level", NULL};
>> +	int level;
>> +
>> +	if (!PyArg_ParseTupleAndKeywords(args,
>> +					 kwargs,
>> +					 "i",
>> +					 kwlist,
>> +					 &level)) {
>> +		return NULL;
>> +	}
>> +
>> +	if (level < 0)
>> +		level = 0;
>> +
>> +	tracefs_set_loglevel(level);
>> +	tep_set_loglevel(level);
>> +
>> +	Py_RETURN_NONE;
>> +}
>> +
>>   static bool set_fork_options(struct tracefs_instance *instance, bool enable)
>>   {
>>   	if (enable) {
>> diff --git a/src/ftracepy-utils.h b/src/ftracepy-utils.h
>> index d826427..5d7c19c 100644
>> --- a/src/ftracepy-utils.h
>> +++ b/src/ftracepy-utils.h
>> @@ -155,6 +155,9 @@ PyObject *PyFtrace_disable_kprobe(PyObject *self, PyObject *args,
>>   PyObject *PyFtrace_kprobe_is_enabled(PyObject *self, PyObject *args,
>>   						     PyObject *kwargs);
>>   
>> +PyObject *PyFtrace_set_ftrace_loglevel(PyObject *self, PyObject *args,
>> +						       PyObject *kwargs);
>> +
>>   PyObject *PyFtrace_trace_process(PyObject *self, PyObject *args,
>>   						 PyObject *kwargs);
>>   
>> diff --git a/src/ftracepy.c b/src/ftracepy.c
>> index e5fcd54..e3fec7b 100644
>> --- a/src/ftracepy.c
>> +++ b/src/ftracepy.c
>> @@ -269,6 +269,11 @@ static PyMethodDef ftracepy_methods[] = {
>>   	 METH_VARARGS | METH_KEYWORDS,
>>   	 "Check if kprobe event is enabled."
>>   	},
>> +	{"set_ftrace_loglevel",
>> +	 (PyCFunction) PyFtrace_set_ftrace_loglevel,
>> +	 METH_VARARGS | METH_KEYWORDS,
>> +	 "Set the verbose level of the ftrace libraries."
>> +	},
>>   	{"trace_process",
>>   	 (PyCFunction) PyFtrace_trace_process,
>>   	 METH_VARARGS | METH_KEYWORDS,
> 

      reply	other threads:[~2021-07-26  9:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 12:32 [PATCH 1/4] trace-cruncher: Add set_ftrace_loglevel() Yordan Karadzhov (VMware)
2021-07-12 12:32 ` [PATCH 2/4] trace-cruncher: Add local_tep() to utils Yordan Karadzhov (VMware)
2021-07-12 12:32 ` [PATCH 3/4] trace-cruncher: Allow for detachable instances Yordan Karadzhov (VMware)
2021-07-22 21:19   ` Steven Rostedt
2021-07-26  9:04     ` Yordan Karadzhov (VMware)
2021-07-26 13:48       ` Steven Rostedt
2021-07-12 12:32 ` [PATCH 4/4] trace-cruncher: Allow for detachable kprobes Yordan Karadzhov (VMware)
2021-07-22 21:24   ` Steven Rostedt
     [not found]     ` <cb908dc6-9ca8-7962-723a-a2388cebaf82@gmail.com>
2021-07-29 10:25       ` Yordan Karadzhov
2021-07-22 21:15 ` [PATCH 1/4] trace-cruncher: Add set_ftrace_loglevel() Steven Rostedt
2021-07-26  9:34   ` Yordan Karadzhov (VMware) [this message]

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=b65d92d5-4978-a9c1-e04d-52f58638d8c5@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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).