qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC 0/8] Introduce an extensible static analyzer


From: Paolo Bonzini
Subject: Re: [RFC 0/8] Introduce an extensible static analyzer
Date: Sat, 2 Jul 2022 16:17:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

On 7/2/22 13:33, Alberto Faria wrote:
The current primary motivation for this work is enforcing rules around
block layer coroutines, which is why most of the series focuses on that.
However, the static analyzer is intended to be sufficiently generic to
satisfy other present and future QEMU static analysis needs.

This is very early work-in-progress, and a lot is missing. One notable
omission is build system integration, including keeping track of which
translation units have been modified and need re-analyzing.

Performance is bad, but there is a lot of potential for optimization,
such as avoiding redundant AST traversals. Switching to C libclang is
also a possibility, although Python makes it easy to quickly prototype
new checks, which should encourage adoption and contributions.

The script takes a path to the build directory, and any number of paths
to directories or files to analyze. Example run on a 12-thread laptop:

Thanks, this is very useful! Unfortunately there's quite a lot of fixes to go in (including your generated_co_wrapper cleanup series and mine[1]) before this can be enabled, but I think this is the way to go to 1) ease maintainability of coroutine code 2) move towards a model where there are no mixed coroutine/non-coroutine functions.

I'll review it when I'm back, since a phone screen is not the best environment to do that. :)

Paolo

[1] https://patchew.org/QEMU/20220509103019.215041-1-pbonzini@redhat.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]