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]
Date:	Mon, 8 Dec 2014 17:13:23 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...nel.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jeremie Galarneau <jgalar@...icios.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Tom Zanussi <tzanussi@...il.com>
Subject: Re: [PATCH 3/8] perf data: Add perf data to CTF conversion support

On Thu, Dec 4, 2014 at 1:23 AM, Jiri Olsa <jolsa@...nel.org> wrote:
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 33864dd316e5..2d3229ec0a23 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -402,6 +402,10 @@ LIB_OBJS += $(OUTPUT)util/tsc.o
>  LIB_OBJS += $(OUTPUT)util/cloexec.o
>  LIB_OBJS += $(OUTPUT)util/thread-stack.o
>
> +ifneq ($(NO_LIBBABELTRACE),1)

I think we usually do it with just "ifndef".


> +LIB_OBJS += $(OUTPUT)util/data-convert-bt.o
> +endif
> +
>  LIB_OBJS += $(OUTPUT)ui/setup.o
>  LIB_OBJS += $(OUTPUT)ui/helpline.o
>  LIB_OBJS += $(OUTPUT)ui/progress.o

[SNIP]
> +static int add_generic_values(struct ctf_writer *cw,
> +                             struct bt_ctf_event *event,
> +                             struct perf_evsel *evsel,
> +                             struct perf_sample *sample)
> +{
> +       u64 type = evsel->attr.sample_type;
> +       int ret;
> +
> +       /*
> +        * missing:
> +        *   PERF_SAMPLE_TIME         - not needed as we have it in
> +        *                              ctf event header
> +        *   PERF_SAMPLE_READ         - TODO
> +        *   PERF_SAMPLE_CALLCHAIN    - TODO
> +        *   PERF_SAMPLE_RAW          - tracepoint fields are handled separately
> +        *   PERF_SAMPLE_BRANCH_STACK - TODO
> +        *   PERF_SAMPLE_REGS_USER    - TODO
> +        *   PERF_SAMPLE_STACK_USER   - TODO
> +        */
> +
> +       if (type & PERF_SAMPLE_IP) {
> +               ret = value_set_u64_hex(cw, event, "ip", sample->ip);
> +               if (ret)
> +                       return -1;
> +       }
> +
> +       if (type & PERF_SAMPLE_TID) {
> +               ret = value_set_s32(cw, event, "tid", sample->tid);
> +               if (ret)
> +                       return -1;
> +
> +               ret = value_set_s32(cw, event, "pid", sample->tid);

sample->pid ?


> +               if (ret)
> +                       return -1;
> +       }
> +
> +       if ((type & PERF_SAMPLE_ID) ||
> +           (type & PERF_SAMPLE_IDENTIFIER)) {
> +               ret = value_set_u64(cw, event, "id", sample->id);
> +               if (ret)
> +                       return -1;
> +       }
> +
> +       if (type & PERF_SAMPLE_STREAM_ID) {
> +               ret = value_set_u64(cw, event, "stream_id", sample->id);

sample->stream_id ?

Thanks,
Namhyung


> +               if (ret)
> +                       return -1;
> +       }
--
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