Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576541

Re: [PATCH v6 2/3] perf tool: add PERF_RECORD_NAMESPACES to include namespaces related info

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 2/3] perf tool: add PERF_RECORD_NAMESPACES to include namespaces related info
Date 2017-02-08 14:10 +0100
Message-ID <t8Aau-Kl-19@gated-at.bofh.it> (permalink)
References <t8vXc-6oU-27@gated-at.bofh.it> <t8vXd-6oU-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 08, 2017 at 02:01:49PM +0530, Hari Bathini wrote:

SNIP

> +size_t perf_event__fprintf_namespaces(union perf_event *event, FILE *fp)
> +{
> +	size_t ret = 0;
> +	struct perf_ns_link_info *ns_link_info;
> +	u32 nr_namespaces, idx;
> +
> +	ns_link_info = event->namespaces.link_info;
> +	nr_namespaces = event->namespaces.nr_namespaces;
> +
> +	ret += fprintf(fp, " %d/%d - nr_namespaces: %u [",
> +		       event->namespaces.pid,
> +		       event->namespaces.tid,
> +		       nr_namespaces);
> +
> +	for (idx = 0; idx < nr_namespaces; idx++)
> +		ret  += fprintf(fp, "%s: %lu/0x%lx%s", ns_link_info[idx].name,
> +				(u64)ns_link_info[idx].dev,
> +				(u64)ns_link_info[idx].ino,
> +				((idx + 1) != nr_namespaces) ? ", " : "]\n\n");

could you please shape the output the same way we do
for other events, currently you display namespaces like:

  0 0x1848 [0xd0]: PERF_RECORD_NAMESPACES 3006/3006 - nr_namespaces: 7 [net: 3/0xf0000081, uts: 3/0xeffffffe, ipc: 3/0xefffffff, pid: 3/0xeffffffc, user: 3/0xeffffffd, mnt: 3/0xf0000000, cgroup: 3/0xeffffffb]

it also screws the less output of perf report -D for me..

usually we do multiple lines output, like:

1941502405539 0x1f48 [0x28]: PERF_RECORD_SAMPLE(IP, 0x2): 3006/3006: 0x55d47fdf2436 period: 422589 addr: 0
 ... thread: ls:3006
 ...... dso: /usr/bin/ls


thanks,
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/3] perf: add support for analyzing events for containers Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-08 09:40 +0100
  [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-08 09:40 +0100
  [PATCH v6 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-08 09:40 +0100
    Re: [PATCH v6 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Jiri Olsa <jolsa@redhat.com> - 2017-02-08 14:10 +0100
    Re: [PATCH v6 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Jiri Olsa <jolsa@redhat.com> - 2017-02-08 14:10 +0100
    Re: [PATCH v6 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Jiri Olsa <jolsa@redhat.com> - 2017-02-08 14:10 +0100
  [PATCH v6 3/3] perf tool: add cgroup identifier entry in perf report Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-08 09:40 +0100

csiph-web