Google
  Web www.spinics.net

Re: [PATCH 2/6 -tip] perf stat: treat same behaviour for all CYCLES and CLOCKS

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


* Paul Mackerras <paulus@xxxxxxxxx> wrote:

> Ingo Molnar writes:
> 
> > Other 'compound' events might be possible too: for example a new 
> > cache-hits field could be is cache-refs minus cache-misses.
> 
> Hmmm, on the MPC7450 family there are events for cache-hits and 
> cache-misses, so there it would be nice to be able to ask for 
> cache-refs and have it compute cache-hits plus cache-misses.

Yes. I think the API is structured enough so that user-space knows 
enough about the meaning of the events here. We can certainly 
stipulate this rule:

	refs == hits + misses

And if the kernel returns -ENODEV for a particular component 
user-space can fall back using the other two events.

I.e. this would allow transparent support for all 3 permutations:

	hw has refs and hits
	hw has refs and misses
	hw has hits and misses

For sampling it's a tiny bit tricky but still doable:j a compound 
counter could still sample because we handle weighted samples 
throughout the tools and negative weight can be subtraced.

Intuitive annotation output would have to be thought out for this as 
entries/function could go negative statistically.

> > I.e. the simplest model for 'compound' events would be:
> > 
> >   X = A / B
> >   X = A - B
> >   X = A + B
> > 
> > We could list them in the event table, with a flag that 
> > specifies which arithmetic operation connects two 'atomic' 
> > counters.
> > 
> > Then the adding of a new compound event would only be the matter 
> > of adding one more line to the event table.
> 
> Sounds nice.  If we do this we should ensure that the two events 
> get put into one group if possible.

Correct. Are you interested in adding this, so that it fits the 
MPC7450 family perfectly?

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Site Home]     [Other Archives]     [Linux Kernel Newbies]     [Linux Driver Development]     [Fedora Kernel]     [Linux Kernel Testers]     [Linux SH]     [Linux Omap]     [Linux Kbuild]     [Linux Tape]     [Linux Input]     [Linux Kernel Janitors]     [Linux Kernel Packagers]     [Linux Doc]     [Linux Man Pages]     [Linux API]     [Linux Modules]     [Linux Standards]     [Kernel Announce]     [Memory]     [Netdev]     [Git]     [Linux PCI]     [Linux I2C]     [Linux RDMA]     [Linux NUMA]     [Netfilter]     [Netfilter Devel]     [SELinux]     [Bugtraq]     [FIO]     [Linux Serial]     [Linux PPP]     [Linux ISDN]     [Linux Next]     [Kernel Stable Commits]     [Linux Tip Commits]     [Kernel MM Commits]     [Linux Security Module]     [Ext3]     [Ext4]     [Linux BTRFS]     [Linux XFS]     [Linux NFS]     [Linux Cachefs]     [Reiser FS]     [Initramfs]     [Fastboot]     [Linux RT Users]     [Linux Virtualization]     [LVS Devel]     [Hot Plug]     [KVM]     [KVM PPC]     [KVM ia64]     [Linux Containers]     [Util Linux NG]     [Sk Drivers]     [Wireless]     [Linux Bluetooth]     [Bluez Devel]     [Ethernet Bridging]     [LM Sensors]     [Embedded Linux]     [Linux MMC]     [Sparse]     [Linux Arch]     [Linux ACPI]     [Linux IBM ACPI]     [Linux OpenGL]     [CPU Freq]     [Linux Power Management]     [Linux DCCP]     [Linux SCTP]     [ALSA Devel]     [Linux USB]     [Large Format Photos]     [DVD Store]     [Tux]     [Gimp]     [Yosemite National Park Forum]     [Linux PA RISC]     [MIPS Linux]     [IBM S/390 Linux]     [ARM Linux]     [ARM Kernel]     [Sparc Linux]     [Linux Security]     [Linux Sound]     [Linux Media]     [Video 4 Linux]     [Linux IRDA Users]     [Linux for the blind]     [Linux RAID]     [Linux ATA RAID]     [Device Mapper]     [Linux Clusters]     [Linux SCSI]     [Linux SCSI Target Infrastructure]     [Linux IDE]     [Linux SMP]     [Linux AXP]     [Linux Alpha]     [Linux M68K]     [Linux ia64]     [Linux 8086]     [Linux x86_64]     [Linux Config]     [Linux Apps]     [Linux MSDOS]     [Linux X.25]     [Linux Crypto]     [DM Crypt]     [Linux Btrace]     [Utrace Devel]     [Yosemite Photos]     [Linux C Programming]     [Linux Assembly]     [Dash]     [DWARVES]     [Hail Devel]     [Older Kernel Mail]

Add to Google Powered by Linux