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: <20150324151646.GD5447@kernel.org>
Date:	Tue, 24 Mar 2015 12:16:46 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/9] tools lib traceevent: Add pevent_data_pid_from_comm()

Em Tue, Mar 24, 2015 at 09:57:52AM -0400, Steven Rostedt escreveu:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> 
> There is a pevent_data_comm_from_pid() that returns the cmdline stored for
> a given pid in order for users to map pids to comms, but there's no method
> to convert a comm back to a pid. This is useful for filters that specify
> a comm instead of a PID (it's faster than searching each individual event).
> 
> Add a way to retrieve a comm from a pid. Since there can be more than one
> pid associated to a comm, it returns a data structure that lets the user
> iterate over all the saved comms for a given pid.
> 
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> ---
>  tools/lib/traceevent/event-parse.c | 90 ++++++++++++++++++++++++++++++++++++++
>  tools/lib/traceevent/event-parse.h |  5 +++
>  2 files changed, 95 insertions(+)
> 
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 5795d9451063..8cc3e894ff46 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -4951,6 +4951,96 @@ const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid)
>  	return comm;
>  }
>  

I am fixing this up:


[acme@...andy linux]$ am /wb/1.patch && make -C tools/perf
LIBBABELTRACE_DIR=/opt/libbabeltrace/  O=/tmp/build/perf install-bin
Applying: tools lib traceevent: Add pevent_data_pid_from_comm()
/home/acme/git/linux/.git/rebase-apply/patch:96: trailing whitespace.
	if (!pevent->cmdlines || 
warning: 1 line adds whitespace errors.
tools/lib/traceevent/event-parse.c:5039: trailing whitespace.
+	if (!pevent->cmdlines || 
[acme@...andy linux]$ 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ