+ if (produce_statev && units != NULL) {
+ /* attempt to guess a good name for the file */
+ const char *first_cup = units->name;
+ if (first_cup != NULL) {
+ const char *dot = strrchr(first_cup, '.');
+ const char *pos = dot ? dot : first_cup + strlen(first_cup);
+ char buf[pos-first_cup+1];
+ strncpy(buf, first_cup, pos-first_cup);
+ buf[pos-first_cup] = '\0';
+
+ stat_ev_begin(buf, filtev);
+ }
+ }
+