Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-08 Thread Kris Van Hees
On Mon, Jul 08, 2019 at 02:15:37PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Jul 03, 2019 at 08:14:30PM -0700, Kris Van Hees escreveu: > > This initial implementation of a tiny subset of DTrace functionality > > provides the following options: > > > > dtrace [-lvV] [-b bufsz] -s script

Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-08 Thread Arnaldo Carvalho de Melo
Em Wed, Jul 03, 2019 at 08:14:30PM -0700, Kris Van Hees escreveu: > This initial implementation of a tiny subset of DTrace functionality > provides the following options: > > dtrace [-lvV] [-b bufsz] -s script > -b set trace buffer size > -l list probes (only works with

Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-08 Thread Kris Van Hees
On Thu, Jul 04, 2019 at 03:03:36PM +0200, Peter Zijlstra wrote: > On Wed, Jul 03, 2019 at 08:14:30PM -0700, Kris Van Hees wrote: > > +/* > > + * Read the data_head offset from the header page of the ring buffer. The > > + * argument is declared 'volatile' because it references a memory mapped > >

Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-08 Thread Kris Van Hees
On Thu, Jul 04, 2019 at 03:05:09PM +0200, Peter Zijlstra wrote: > On Wed, Jul 03, 2019 at 08:14:30PM -0700, Kris Van Hees wrote: > > +int dt_bpf_attach(int event_id, int bpf_fd) > > +{ > > + int event_fd; > > + int rc; > > + struct perf_event_attr attr

Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-04 Thread Brendan Gregg
On Wed, Jul 3, 2019 at 8:17 PM Kris Van Hees wrote: > > This initial implementation of a tiny subset of DTrace functionality > provides the following options: > > dtrace [-lvV] [-b bufsz] -s script > -b set trace buffer size > -l list probes (only works with '-s s

Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-04 Thread Peter Zijlstra
On Wed, Jul 03, 2019 at 08:14:30PM -0700, Kris Van Hees wrote: > +int dt_bpf_attach(int event_id, int bpf_fd) > +{ > + int event_fd; > + int rc; > + struct perf_event_attr attr = {}; > + > + attr.type = PERF_TYPE_TRACEPOINT; > + attr.samp

Re: [PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-04 Thread Peter Zijlstra
On Wed, Jul 03, 2019 at 08:14:30PM -0700, Kris Van Hees wrote: > +/* > + * Read the data_head offset from the header page of the ring buffer. The > + * argument is declared 'volatile' because it references a memory mapped page > + * that the kernel may be writing to while we access it here. > + */

[PATCH 1/1] tools/dtrace: initial implementation of DTrace

2019-07-03 Thread Kris Van Hees
This initial implementation of a tiny subset of DTrace functionality provides the following options: dtrace [-lvV] [-b bufsz] -s script -b set trace buffer size -l list probes (only works with '-s script' for now) -s enable or list probes for the spec