lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230811132811.28b9b766@gandalf.local.home>
Date:   Fri, 11 Aug 2023 13:28:11 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Ze Gao <zegao2021@...il.com>
Cc:     acme@...nel.org, adrian.hunter@...el.com,
        alexander.shishkin@...ux.intel.com, irogers@...gle.com,
        jolsa@...nel.org, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org,
        linux-trace-kernel@...r.kernel.org, mark.rutland@....com,
        mhiramat@...nel.org, mingo@...hat.com, namhyung@...nel.org,
        peterz@...radead.org, zegao@...cent.com
Subject: Re: [PATCH] perf sched: parse task state from tracepoint print
 format

On Thu, 10 Aug 2023 01:50:24 -0400
Ze Gao <zegao2021@...il.com> wrote:

> Hi Steven,
> 
> I managed to build task state char map dynamically by parsing
> the tracepoint print format from data recorded by perf. And
> likewise for libtraceevent.
> 
> FYI, I tried TEP_PRINT_INFO but no shot. It turns out TEP_PRINT_INFO
> stills relies on libtraceevent (i.e., sched_switch_handler() in 
> plugin_sched_switch.c) and we need to parse the print format on our own.

There is a way to unload plugins:

	tep_unload_plugins(t->plugin_list, tep);

Hmm, I should add:

	tep_unload_plugin(tep, t->plugin_list, "plugin-name");

To unload a single plugin.

I it can also just override what the plugin does by calling:

static int sched_switch_handler(struct trace_seq *s,
				struct tep_record *record,
				struct tep_event *event, void *context)
{
	// do whatever you want.
}

	tep_register_event_handler(tep, -1, "sched", "sched_switch",
				   sched_switch_handler, NULL);

> 
> Anyway, it works now and I've tested on some perf.data in old formats
> but not cover all the kernel releases.
> 
> Thoughts?

I don't maintain the perf code. You'll have to talk with the perf
maintainers.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ