File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -745,6 +745,8 @@ static int read_object_process(const struct object_id *oid)
745745
746746 start = getnanotime ();
747747
748+ trace2_region_enter ("subprocess" , "read_object" , the_repository );
749+
748750 if (!subprocess_map_initialized ) {
749751 subprocess_map_initialized = 1 ;
750752 hashmap_init (& subprocess_map , (hashmap_cmp_fn )cmd2process_cmp ,
@@ -761,13 +763,16 @@ static int read_object_process(const struct object_id *oid)
761763 if (subprocess_start (& subprocess_map , & entry -> subprocess , cmd ,
762764 start_read_object_fn )) {
763765 free (entry );
764- return -1 ;
766+ err = -1 ;
767+ goto leave_region ;
765768 }
766769 }
767770 process = & entry -> subprocess .process ;
768771
769- if (!(CAP_GET & entry -> supported_capabilities ))
770- return -1 ;
772+ if (!(CAP_GET & entry -> supported_capabilities )) {
773+ err = -1 ;
774+ goto leave_region ;
775+ }
771776
772777 sigchain_push (SIGPIPE , SIG_IGN );
773778
@@ -816,6 +821,10 @@ static int read_object_process(const struct object_id *oid)
816821
817822 trace_performance_since (start , "read_object_process" );
818823
824+ leave_region :
825+ trace2_region_leave_printf ("subprocess" , "read_object" , the_repository ,
826+ "result %d" , err );
827+
819828 return err ;
820829}
821830
You can’t perform that action at this time.
0 commit comments