@@ -475,29 +475,34 @@ pub fn filter_covfun(
475475 records : Vec < RawFunctionCounters > ,
476476 prf_names : HashMap < i64 , String > ,
477477 covmap : & CovMap ,
478- keep : impl Fn ( & Path ) -> bool ,
478+ keep : impl Fn ( & Path , & str ) -> bool ,
479479) -> Vec < PartialFunctionRecord > {
480480 records
481481 . into_iter ( )
482- . filter_map ( |function_counters| {
483- let filenames = & covmap[ & function_counters. header . hash_translation_unit ] ;
484- let mut filepaths = Vec :: new ( ) ;
485- for idx in function_counters. file_id_mapping . filename_indices . iter ( ) {
486- let filename = & filenames[ * idx] ;
487- let filepath = Path :: new ( filename) . to_path_buf ( ) ;
488- if !keep ( & filepath) {
489- return None ;
482+ . filter_map (
483+ #[ no_coverage]
484+ |function_counters| {
485+ let name_function = prf_names[ & function_counters. header . id . name_md5 ] . clone ( ) ;
486+ let name_function = rustc_demangle:: demangle ( & name_function) . to_string ( ) ;
487+
488+ let filenames = & covmap[ & function_counters. header . hash_translation_unit ] ;
489+ let mut filepaths = Vec :: new ( ) ;
490+ for idx in function_counters. file_id_mapping . filename_indices . iter ( ) {
491+ let filename = & filenames[ * idx] ;
492+ let filepath = Path :: new ( filename) . to_path_buf ( ) ;
493+ if !keep ( & filepath, name_function. as_str ( ) ) {
494+ return None ;
495+ }
496+ filepaths. push ( filepath) ;
490497 }
491- filepaths. push ( filepath) ;
492- }
493- let name_function = prf_names[ & function_counters. header . id . name_md5 ] . clone ( ) ;
494-
495- Some ( PartialFunctionRecord {
496- name_function,
497- filenames : filepaths,
498- counters : function_counters,
499- } )
500- } )
498+
499+ Some ( PartialFunctionRecord {
500+ name_function,
501+ filenames : filepaths,
502+ counters : function_counters,
503+ } )
504+ } ,
505+ )
501506 . collect ( )
502507}
503508
0 commit comments