Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 1996 10:37:55 -0800
From:      Wayne Scott <wscott@pdxlx008.intel.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        terry@lambert.org, current@freefall.freebsd.org, dyson@freefall.freebsd.org
Subject:   Re: Optimization topics 
Message-ID:  <199601301837.KAA07469@pdxlx008.intel.com.intel.com>
In-Reply-To: Your message of "Tue, 30 Jan 1996 15:08:25 %2B1100." <199601300408.PAA18640@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >Specifically, it should be possible to run FreeBSD with the unaligned
> >access bit set to disallow unaligned access of word/dword/qword objects.
> 
> I implemented this in Minix about 5 years ago.  My compiler generates
> many misaligned access (it forgets to align switch tables) and gcc
> generates a few (e.g., it generates pessimized inline code for assigning
> poorly (but correctly!) aligned structs:


I might have an easier solution for you.

The Pentium Pro has a misaligned access performance counter that has
the ability to generate interrupts.  You can tell the processor to
count misaligns and generate an interrupt every 1000 times it sees
one.

Put this into you existing profiling code and you will get a profile
of where the system is doing misaligned references.  Now you only need
to fix the very common cases in the critical paths.

The same thing can be done which all the counters.  Which branches are
not predicted well, where am I missing the cache, etc...

The information is in the P6 PRM that should be available next month...

-Wayne

Wayne Scott		        P6 Architecture
wscott@ichips.intel.com		Work #: (503) 264-4165
Disclaimer:  All views expressed are my own opinions, and not necessarily 
             those of Intel Corporation.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601301837.KAA07469>