Giter VIP home page Giter VIP logo

compile-db-gen's People

Contributors

i-ky avatar sunlin7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

electroniccc

compile-db-gen's Issues

Thank you!

I just wanted to thank you for this project. About a year ago I found myself in a situation, when I had to work on a project with an unusual build system. I tried every other compile_commands.json generation tools, but they all were failing to capture compiler invocations properly. Your idea of using strace is brilliant and worked nicely!

Some time later I decided to improve on your idea and develop compile_commands.json generator of my own. The main idea was to use ptrace directly instead or relying on parsing strace logs which are not meant to be machine-readable. Now it is more or less ready for use - https://github.com/i-ky/basset. I will appreciate if you give it a spin and test it in your usage scenarios to find any issues that I have missed.

Use strace's --seccomp-bpf option

Newer versions of strace support --seccomp-bpf option introduced in version 5.3:

Implemented usage of seccomp-bpf for stopping tracees only for filtered
syscalls. Use --seccomp-bpf option to enable.

It has huge impact on performance. According to my tests, strace command currently used by compile-db-gen adds ~100% overhead (i.e. build time doubles under strace). Simply adding --seccomp-bpf reduces overhead to ~10% making it almost unnoticeable.

I honestly don't know why strace developers did not make --seccomp-bpf a new default, but it definitely makes sense to use it in compile-db-gen, if available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.