diff options
author | Alexander Graf <agraf@suse.de> | 2013-06-22 03:53:35 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-07-01 01:11:17 +0200 |
commit | 9761ad757182be663fa31af99abad959ac63b17f (patch) | |
tree | 9c786e73583f0808841e8cbeaf096611ee78075e /target-ppc/cpu-models.c | |
parent | b177d8b77c7301da9b51b829b0edcff367e92023 (diff) | |
download | qemu-9761ad757182be663fa31af99abad959ac63b17f.zip qemu-9761ad757182be663fa31af99abad959ac63b17f.tar.gz qemu-9761ad757182be663fa31af99abad959ac63b17f.tar.bz2 |
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>
Diffstat (limited to 'target-ppc/cpu-models.c')
-rw-r--r-- | target-ppc/cpu-models.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c index 17f56b7..9bb68c8 100644 --- a/target-ppc/cpu-models.c +++ b/target-ppc/cpu-models.c @@ -1227,7 +1227,7 @@ /***************************************************************************/ /* PowerPC CPU aliases */ -const PowerPCCPUAlias ppc_cpu_aliases[] = { +PowerPCCPUAlias ppc_cpu_aliases[] = { { "403", "403GC" }, { "405", "405D4" }, { "405CR", "405CRc" }, |