From: Andi K. <an...@fi...> - 2009-04-27 15:36:28
|
Output more errors in make check before exitting. I found this useful while debugging large event files. Signed-off-by: Andi Kleen <ak...@li...> --- libop/op_events.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) Index: oprofile/libop/op_events.c =================================================================== --- oprofile.orig/libop/op_events.c 2009-04-01 22:57:37.000000000 +0200 +++ oprofile/libop/op_events.c 2009-04-27 10:34:51.000000000 +0200 @@ -403,20 +403,21 @@ /* usefull for make check */ -static void check_unit_mask(struct op_unit_mask const * um, +static int check_unit_mask(struct op_unit_mask const * um, char const * cpu_name) { u32 i; + int err = 0; if (!um->used) { fprintf(stderr, "um %s is not used\n", um->name); - exit(EXIT_FAILURE); + err = EXIT_FAILURE; } if (um->unit_type_mask == utm_mandatory && um->num != 1) { fprintf(stderr, "mandatory um %s doesn't contain exactly one " "entry (%s)\n", um->name, cpu_name); - exit(EXIT_FAILURE); + err = EXIT_FAILURE; } else if (um->unit_type_mask == utm_bitmask) { u32 default_mask = um->default_mask; for (i = 0; i < um->num; ++i) @@ -425,7 +426,7 @@ if (default_mask) { fprintf(stderr, "um %s default mask is not valid " "(%s)\n", um->name, cpu_name); - exit(EXIT_FAILURE); + err = EXIT_FAILURE; } } else { for (i = 0; i < um->num; ++i) { @@ -436,9 +437,10 @@ if (i == um->num) { fprintf(stderr, "exclusive um %s default value is not " "valid (%s)\n", um->name, cpu_name); - exit(EXIT_FAILURE); + err = EXIT_FAILURE; } } + return err; } static void arch_filter_events(op_cpu cpu_type) |