On Fri, May 7, 2010 at 5:29 PM, Bob Copeland <m...@bobcopeland.com> wrote: > On Thu, May 6, 2010 at 6:59 PM, Miklos Christine > <m.w.christ...@gmail.com> wrote: >> Hello all, >> >> I am trying to store sampled values from one of the debugging files. I >> modified the debug.c file to read some registers and print to stdout >> whenever I call: >> $ sudo cat /debug/ath5k/phy0/antenna. > > (There's a "registers" file, FWIW)
I added the registers that I want to the register files, but I need to be able to read 3 registers very quickly. Reading the registers file multiple times could not perform at the speed that I need. > >> I need to read the registers 100,000 a second for approximately 25 seconds >> and store them in memory. After which I could copy the memory to disk. >> I was thinking that I could allocate a large chunk of memory and store the >> values in an array, but was not sure if this was possible. > > What registers are you trying to read? If you just want to see the bus > traffic (i.e. what we read and write), mmiotrace is a better way. I'm > guessing the card won't be too happy if you consume all the bus cycles > with pci reads. The 3 registers I am trying to read are: AR5K_PROFCNT_TX, AR5K_PROFCNT_RXCLR, AR5K_PROFCNT_CYCLE. I read the cycle register twice to bound my samples by a corresponding time value. > > Most people use ftrace's trace buffers for getting this sort of > firehose data out of the kernel. > Thanks for the advice! I'll look into ftrace and mmiotrace. > -- > Bob Copeland %% www.bobcopeland.com > Thanks, Miklos Christine _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel