[PATCH 04/17] scripts/code_cov_parse_info: add support for filtering Xe driver data

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Feb 15 16:36:54 UTC 2024


Hi Mauro,
On 2024-02-15 at 11:27:13 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> Just like it does for i915, add an option to get code coverage
> data from Xe driver.
> 
> For now, it won't be taking DRM core stuff into account; just
> the Xe driver code itself.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  scripts/code_cov_parse_info | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/scripts/code_cov_parse_info b/scripts/code_cov_parse_info
> index ceea67a13d5a..f0fb5716a6ca 100755
> --- a/scripts/code_cov_parse_info
> +++ b/scripts/code_cov_parse_info
> @@ -894,6 +894,7 @@ my $src_filters;
>  my $show_files;
>  my $show_lines;
>  my $only_i915;
> +my $only_xe;
>  my $only_drm;
>  
>  GetOptions(
> @@ -904,6 +905,7 @@ GetOptions(
>  	"verbose|v" => \$verbose,
>  	"ignore-unused|ignore_unused" => \$ignore_unused,
>  	"only-i915|only_i915" => \$only_i915,
> +	"only-xe|only_xe" => \$only_xe,
>  	"only-drm|only_drm" => \$only_drm,
>  	"func-filters|f=s" => \$func_filters,
>  	"include-func=s" => \@func_include_regexes,
> @@ -947,6 +949,14 @@ if ($only_i915) {
>  	push @src_include_regexes, "drm/vgem";
>  }
>  
> +if ($only_xe) {
> +	# Please keep in sync with the documentation
> +	push @src_exclude_regexes, "selftest";
> +	push @src_include_regexes, "drm/xe";
> +#	push @src_include_regexes, "drm/ttm";
> +#	push @src_include_regexes, "drm/vgem";
> +}
> +
>  if ($only_drm) {
>  	# Please keep in sync with the documentation
>  	push @src_exclude_regexes, "trace.*\.h\$";
> @@ -980,7 +990,9 @@ foreach my $f (@ARGV) {
>  
>  	if ($gen_report) {
>  		$f =~ s,.*/,,;
> +		$f =~ s/\.gz$//;
>  		$f =~ s/\.info$//;
> +		$f =~ s/\.json$//;
>  
>  		gen_stats();
>  
> @@ -1162,6 +1174,19 @@ Excluding files that match:
>  
>  	- selftest
>  
> +=item B<--only-xe> or B<--only_xe>
> +
> +Filters out C files and headers outside drm core and drm/i915.
> +
> +E. g. code coverage results will include only the files that that match
> +the following regular expressions:
> +
> +	- drm/xe/
> +
> +Excluding files that match:
> +
> +	- selftest
> +
>  =item B<--func-filters>  B<[filter's file]> or B<-f>  B<[filter's file]>
>  
>  Use a file containing regular expressions (regex) to filter functions.
> -- 
> 2.43.0
> 


More information about the igt-dev mailing list