GrammaTech / ddisasm

A fast and accurate disassembler
https://grammatech.github.io/ddisasm/
GNU Affero General Public License v3.0
645 stars 60 forks source link

Questions about the compilation process #25

Closed quanli95 closed 3 years ago

quanli95 commented 3 years ago

Hello~

I have a simple question about the compilation process. When I compile the ddisasm that I cloned from Github, it will spend more than an hour. And once I modified something in symbolization.dl (add an output), it will also spend more than an hour to compile... I am wondering if this is a common case?

Thanks for answering.

aeflores commented 3 years ago

That time is longer than expected but not unreasonable. The compilation of the Datalog generated program is expensive! We have seen very different times depending on the compiler version. The Datalog program is compiled with high optimizations (-O3) and that can take a while. Plus, there are several Datalog programs compiled, one for each architecture and file format combination (x64 ELF, x64 PE, x86 ELF, x86 PE, and ARM64 ELF).

Are you using parallel compilation i.e. make -j4? That could shorten your compilation time... as long as your machine has enough RAM.

quanli95 commented 3 years ago

Thanks for your reply. That makes sense. I just used make to compile the tool. I will try make -j4 next time.

quanli95 commented 3 years ago

The compilation time shortens a lot with make -j4. Thanks a lot for your help!