Skip to content

Does Unicorn still keep and use the cache after ending execution of uc_emu_start ? #1043

@pent0

Description

@pent0

Context:

  • I'm emulating a type of OS and have to stop each 20000 ticks to reschedule emulated threads. It's something of this:
     while (!shutdown) {
         uc_emu_start(engine, pc, 1ULL << 63, 0, 20000);
         do_kernel_reschedule();
     }
  • If I try to run this without instructions limit, and do reschedule in code hook, it's super fast. But if I do like above, the performance drops are noticeable, especially when the emulated system enters a big loop.

  • It's not my reschedule that's slow, because there is another JIT backend I use, that although slower than Unicorn in general, but it keeps the cache and suprass Unicorn in loop situation.

  • So does Unicorn still keep cache after uc_emu_start done?

TLDR: Unicorn is slow when restarting continously. I want to ask if Unicorn stills keep cache after uc_emu_start done.

I'm happy to provide more information. Thanks.

Note: The build I'm using is release build on the web, but this question still relevant to master branch on github.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions