[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180419112004.5eb67a84@redhat.com>
Date: Thu, 19 Apr 2018 11:20:04 +0200
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Sebastiano Miano <sebastiano.miano@...ito.it>
Cc: netdev@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
mingo@...hat.com, rostedt@...dmis.org, fulvio.risso@...ito.it,
brouer@...hat.com
Subject: Re: [bpf-next PATCH 3/3] bpf: add sample program to trace map
events
On Wed, 18 Apr 2018 17:30:59 +0200
Sebastiano Miano <sebastiano.miano@...ito.it> wrote:
> This patch adds a sample program, called trace_map_events,
> that shows how to capture map events and filter them based on
> the map id.
>
> The program accepts a list of map IDs, via the -i command line
> option, and filters all the map events related to those IDs (i.e.,
> map_create/update/lookup/next_key).
> If no IDs are specified, all map events are listed and no filtering
> is performed.
>
> Sample usage:
>
> # trace_map_events -i <map_id1> -i <map_id2> -i <map_id3> ...
>
> Signed-off-by: Sebastiano Miano <sebastiano.miano@...ito.it>
Acked-by: Jesper Dangaard Brouer <brouer@...hat.com>
I have tested it works:
$ sudo ./trace_map_events -i 2
Init bpf_perf_event for cpu:0
Init bpf_perf_event for cpu:1
Init bpf_perf_event for cpu:2
Init bpf_perf_event for cpu:3
Init bpf_perf_event for cpu:4
Init bpf_perf_event for cpu:5
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
LOOKUP event for map id: 2 and type: 6
Waiting for map events...
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists