All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid.com>
To: He Kuang <hekuang@huawei.com>,
	rostedt@goodmis.org, masami.hiramatsu.pt@hitachi.com,
	acme@kernel.org, a.p.zijlstra@chello.nl, mingo@redhat.com,
	namhyung@kernel.org, jolsa@kernel.org
Cc: wangnan0@huawei.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v3 1/2] tracing: Add new trace type for bpf data output
Date: Tue, 07 Jul 2015 18:35:34 -0700	[thread overview]
Message-ID: <559C7E66.9040404@plumgrid.com> (raw)
In-Reply-To: <1436269386-72037-2-git-send-email-hekuang@huawei.com>

On 7/7/15 4:43 AM, He Kuang wrote:
> +	F_STRUCT(
> +		__field(long,	size)

as Peter said please use u32 to avoid 32 vs 64-bit issues.

> +		__array(u64,	raw_data,	TRACE_BPF_MAX_ENTRY)
> +	),
> +
> +	F_printk("%ld: (%016llx, ...)", __entry->size, __entry->raw_data[0]),

can we conditionally print raw_data[0], raw_data[1], ..[3] when
values are non-zero? '...' as part of print is kinda useless.
Also I would drop '()' and ',' they don't add much value.
Remember we won't be able to change this format once it goes in.



  parent reply	other threads:[~2015-07-08  1:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 11:43 [RFC PATCH v3 0/2] Make eBPF programs output data to perf event He Kuang
2015-07-07 11:43 ` [RFC PATCH v3 1/2] tracing: Add new trace type for bpf data output He Kuang
2015-07-07 22:47   ` Peter Zijlstra
2015-07-08  1:35   ` Alexei Starovoitov [this message]
2015-07-07 11:43 ` [RFC PATCH v3 2/2] bpf: Introduce function for outputing data to perf event He Kuang
2015-07-08  1:45   ` Alexei Starovoitov
2015-07-08  1:31 ` [RFC PATCH v3 0/2] Make eBPF programs output " Alexei Starovoitov

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=559C7E66.9040404@plumgrid.com \
    --to=ast@plumgrid.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=wangnan0@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.