ip_forward - how to read instructions count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

i have make some modifications to ip_forward code and would like to do some
performance monitoring.
It would be great to get sth more than rdtscl()(cycles) only .

I have PIII cpu. And i would like to know what was the INSTRUCTION COUNT in
changed code snipped and maybyeINTERRUPTION COUNT value would also be
benefitial.

Do you KNOW what should i do to read (and probably first enable) performance
monitoring counters (like MSR) FROM KERNEL SPACE, to get how many
instructions were executed inside profiled code part?

Any example (or link, or sth else that could help) would be great!

Underneath there is sample code that reads PMC counters ..but from user
space level (BTW this is Rabbit library):

      pmc_select(&Ctl.counters[out]);
      for (k = 0; k < TRIALS; k++) {
	pmc_read(&t0);

        /* profiled code here*/

	pmc_read(&t1);
	pmc_accumulate(&Ctl.counters[out],&t1,&t0);


any help appreciated!!

adam

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux