lkml.org 
[lkml]   [2016]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [kernel-hardening] [PATCH v8 3/4] Add Cyclomatic complexity GCC plugin
From
Date
On 13/05/16 09:58, Emese Revfy wrote:
> Add a very simple plugin to demonstrate the GCC plugin infrastructure. This GCC
> plugin computes the cyclomatic complexity of each function.

...

> +config GCC_PLUGIN_CYC_COMPLEXITY
> + bool "Compute the cyclomatic complexity of a function"
> + depends on GCC_PLUGINS
> + help
> + The complexity M of a function's control flow graph is defined as:
> + M = E - N + 2P
> + where
> +
> + E = the number of edges
> + N = the number of nodes
> + P = the number of connected components (exit nodes).
> +

If this plugin is intended primarily as a demonstration it's probably
worth mentioning this in the Kconfig description.

--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited

\
 
 \ /
  Last update: 2016-05-18 11:01    [W:0.111 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site