@@ -51,6 +51,8 @@ enum stat_id {
51
51
PROG_TYPE ,
52
52
ATTACH_TYPE ,
53
53
MEMORY_PEAK ,
54
+ LIVENESS_ALLOCS ,
55
+ LIVENESS_MEM ,
54
56
55
57
FILE_NAME ,
56
58
PROG_NAME ,
@@ -738,10 +740,11 @@ static int append_filter_file(const char *path)
738
740
}
739
741
740
742
static const struct stat_specs default_output_spec = {
741
- .spec_cnt = 8 ,
743
+ .spec_cnt = 10 ,
742
744
.ids = {
743
745
FILE_NAME , PROG_NAME , VERDICT , DURATION ,
744
- TOTAL_INSNS , TOTAL_STATES , SIZE , JITED_SIZE
746
+ TOTAL_INSNS , TOTAL_STATES , SIZE , JITED_SIZE ,
747
+ LIVENESS_ALLOCS , LIVENESS_MEM ,
745
748
},
746
749
};
747
750
@@ -789,13 +792,13 @@ static int append_file_from_file(const char *path)
789
792
}
790
793
791
794
static const struct stat_specs default_csv_output_spec = {
792
- .spec_cnt = 15 ,
795
+ .spec_cnt = 17 ,
793
796
.ids = {
794
797
FILE_NAME , PROG_NAME , VERDICT , DURATION ,
795
798
TOTAL_INSNS , TOTAL_STATES , PEAK_STATES ,
796
799
MAX_STATES_PER_INSN , MARK_READ_MAX_LEN ,
797
800
SIZE , JITED_SIZE , PROG_TYPE , ATTACH_TYPE ,
798
- STACK , MEMORY_PEAK ,
801
+ STACK , MEMORY_PEAK , LIVENESS_ALLOCS , LIVENESS_MEM ,
799
802
},
800
803
};
801
804
@@ -837,6 +840,8 @@ static struct stat_def {
837
840
[PROG_TYPE ] = { "Program type" , {"prog_type" }, },
838
841
[ATTACH_TYPE ] = { "Attach type" , {"attach_type" , }, },
839
842
[MEMORY_PEAK ] = { "Peak memory (MiB)" , {"mem_peak" , }, },
843
+ [LIVENESS_ALLOCS ] = { "liveness allocs" , {"liveness_allocs" , }, },
844
+ [LIVENESS_MEM ] = { "liveness mem" , {"liveness_mem" , }, },
840
845
};
841
846
842
847
static bool parse_stat_id_var (const char * name , size_t len , int * id ,
@@ -1015,12 +1020,15 @@ static int parse_verif_log(char * const buf, size_t buf_sz, struct verif_stats *
1015
1020
1016
1021
if (1 == sscanf (cur , "verification time %ld usec\n" , & s -> stats [DURATION ]))
1017
1022
continue ;
1018
- if (5 == sscanf (cur , "processed %ld insns (limit %*d) max_states_per_insn %ld total_states %ld peak_states %ld mark_read %ld" ,
1023
+ if (5 == sscanf (cur , "processed %ld insns (limit %*d) max_states_per_insn %ld total_states %ld peak_states %ld mark_read %ld num_liveness_allocs %ld total_liveness_mem %ld " ,
1019
1024
& s -> stats [TOTAL_INSNS ],
1020
1025
& s -> stats [MAX_STATES_PER_INSN ],
1021
1026
& s -> stats [TOTAL_STATES ],
1022
1027
& s -> stats [PEAK_STATES ],
1023
- & s -> stats [MARK_READ_MAX_LEN ]))
1028
+ & s -> stats [MARK_READ_MAX_LEN ],
1029
+ & s -> stats [LIVENESS_ALLOCS ],
1030
+ & s -> stats [LIVENESS_MEM ]
1031
+ ))
1024
1032
continue ;
1025
1033
1026
1034
if (1 == sscanf (cur , "stack depth %511s" , stack ))
@@ -2299,6 +2307,8 @@ static int cmp_stat(const struct verif_stats *s1, const struct verif_stats *s2,
2299
2307
case PEAK_STATES :
2300
2308
case MAX_STATES_PER_INSN :
2301
2309
case MEMORY_PEAK :
2310
+ case LIVENESS_ALLOCS :
2311
+ case LIVENESS_MEM :
2302
2312
case MARK_READ_MAX_LEN : {
2303
2313
long v1 = s1 -> stats [id ];
2304
2314
long v2 = s2 -> stats [id ];
@@ -2528,6 +2538,8 @@ static void prepare_value(const struct verif_stats *s, enum stat_id id,
2528
2538
case STACK :
2529
2539
case SIZE :
2530
2540
case JITED_SIZE :
2541
+ case LIVENESS_ALLOCS :
2542
+ case LIVENESS_MEM :
2531
2543
case MEMORY_PEAK :
2532
2544
* val = s ? s -> stats [id ] : 0 ;
2533
2545
break ;
@@ -2615,6 +2627,8 @@ static int parse_stat_value(const char *str, enum stat_id id, struct verif_stats
2615
2627
case MARK_READ_MAX_LEN :
2616
2628
case SIZE :
2617
2629
case JITED_SIZE :
2630
+ case LIVENESS_ALLOCS :
2631
+ case LIVENESS_MEM :
2618
2632
case MEMORY_PEAK :
2619
2633
case STACK : {
2620
2634
long val ;
0 commit comments