Interesting, relevant paper mentioned in response to the linked SO question:
MAO - an Extensible Micro-Architectural Optimizer - http://static.googleusercontent.com/external_content/untrust...
MAO - an Extensible Micro-Architectural Optimizer - http://static.googleusercontent.com/external_content/untrust...