| 735 | } |
| 736 | |
| 737 | inline static int mi_add_module_stats(mi_item_t *resp_obj, module_stats *mods) |
| 738 | { |
| 739 | stat_var *stat; |
| 740 | int ret = 0; |
| 741 | |
| 742 | if (mods->is_dyn) |
| 743 | lock_start_read((rw_lock_t *)collector->rwl); |
| 744 | |
| 745 | for( stat=mods->head ; stat ; stat=stat->lnext) { |
| 746 | if (stat_is_hidden(stat)) |
| 747 | continue; |
| 748 | ret = mi_print_stat(resp_obj, &mods->name, &stat->name, |
| 749 | get_stat_val(stat)); |
| 750 | if (ret < 0) |
| 751 | break; |
| 752 | } |
| 753 | |
| 754 | if (mods->is_dyn) |
| 755 | lock_stop_read((rw_lock_t *)collector->rwl); |
| 756 | |
| 757 | return ret; |
| 758 | } |
| 759 | |
| 760 | inline static int mi_list_module_stats(mi_item_t *resp_obj, module_stats *mods) |
| 761 | { |
no test coverage detected