Re: [PATCH v1 0/2] Add procfs based memory and network tool events
From: Ian Rogers
Date: Mon Jan 12 2026 - 13:08:34 EST
On Mon, Jan 12, 2026 at 8:51 AM Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
>
> Ian Rogers <irogers@xxxxxxxxxx> writes:
>
> > Add events for memory use and network activity based on data readily
> > available in /prod/pid/statm, /proc/pid/smaps_rollup and
> > /proc/pid/net/dev. For example the network usage of chrome processes
> > on a system may be gathered with:
> > ```
> > $ perf stat -e
> > net_rx_bytes,net_rx_compressed,net_rx_drop,net_rx_errors,net_rx_fifo,net_rx_frame,net_rx_multicast,net_rx_packets,net_tx_bytes,net_tx_carrier,net_tx_colls,net_tx_compressed,net_tx_drop,net_tx_errors,net_tx_fifo,net_tx_packets
> > -p $(pidof -d, chrome) -I 1000
>
> But AFAIK that's for the complete network name space, not just the
> process, thus highly misleading in perf context because the scope
> is incompatible.
Yeah, we can point this out in the event descriptions or just not have
the events and try to do some per process BPF type thing. Given we
don't have the BPF thing it is still tempting to have these counters
as-is for the system-wide case.
Thanks,
Ian