Replies: 1 comment 5 replies
-
|
There are several issues related to the TB Cache (i.e. #2258) so I would guess the Cache is working. Can you share your test code (including the sample blob you emulate)? Did you use the Did you register any hooks? Depending on the hook (code hook or memory hook) this might lead to a massive slowdown because unicorn needs to disable some optimization to be able to call this hooks. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is the TCG translation cache functional in unicorn? I know that unicorn uses a relatively old version of QEMU (and therefore TCG), but I was wondering if there’s any known pre-existing issues with the translation cache in unicorn.
Using a basic matrix multiplication test to check the performance between QEMU and unicorn, we got average runtimes of 0.618s (unicorn) vs 0.028s (QEMU) for 64x64 matrices. The performance difference at larger matrix sizes seems to suggest that the cache isn’t working.
We also manually set the cache size to 0 by redefining DEFAULT_CODE_GEN_BUFFER_SIZE_1 in TCG’s translate-all.c (I’m not 100% sure that this is the right/only control for the cache, but it’s what we could find). The runtime was nearly identical when compared to the default cache size of 1GB, which further supports the hypothesis that it’s not working properly.
Beta Was this translation helpful? Give feedback.
All reactions