]> git.proxmox.com Git - qemu.git/commit
PPC: Introduce an alias cache for faster lookups
authorAlexander Graf <agraf@suse.de>
Sat, 22 Jun 2013 01:53:35 +0000 (03:53 +0200)
committerAlexander Graf <agraf@suse.de>
Sun, 30 Jun 2013 23:11:17 +0000 (01:11 +0200)
commit9761ad757182be663fa31af99abad959ac63b17f
tree9c786e73583f0808841e8cbeaf096611ee78075e
parentb177d8b77c7301da9b51b829b0edcff367e92023
PPC: Introduce an alias cache for faster lookups

When running QEMU with "-cpu ?" we walk through every alias for every
target CPU we know about. This takes several seconds on my very fast
host system.

Let's introduce a class object cache in the alias table. Using that we
don't have to go through the tedious work of finding our target class.
Instead, we can just go directly from the alias name to the target class
pointer.

This patch brings -cpu "?" to reasonable times again.

Before:
  real    0m4.716s

After:
  real    0m0.025s

Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/cpu-models.c
target-ppc/cpu-models.h
target-ppc/translate_init.c