dump statistics about timers */
| 1031 | |
| 1032 | /* dump statistics about timers */ |
| 1033 | static void |
| 1034 | __rte_timer_dump_stats(struct rte_timer_data *timer_data __rte_unused, FILE *f) |
| 1035 | { |
| 1036 | #ifdef RTE_LIBRTE_TIMER_DEBUG |
| 1037 | struct rte_timer_debug_stats sum; |
| 1038 | unsigned lcore_id; |
| 1039 | struct priv_timer *priv_timer = timer_data->priv_timer; |
| 1040 | |
| 1041 | memset(&sum, 0, sizeof(sum)); |
| 1042 | for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { |
| 1043 | sum.reset += priv_timer[lcore_id].stats.reset; |
| 1044 | sum.stop += priv_timer[lcore_id].stats.stop; |
| 1045 | sum.manage += priv_timer[lcore_id].stats.manage; |
| 1046 | sum.pending += priv_timer[lcore_id].stats.pending; |
| 1047 | } |
| 1048 | fprintf(f, "Timer statistics:\n"); |
| 1049 | fprintf(f, " reset = %"PRIu64"\n", sum.reset); |
| 1050 | fprintf(f, " stop = %"PRIu64"\n", sum.stop); |
| 1051 | fprintf(f, " manage = %"PRIu64"\n", sum.manage); |
| 1052 | fprintf(f, " pending = %"PRIu64"\n", sum.pending); |
| 1053 | #else |
| 1054 | fprintf(f, "No timer statistics, RTE_LIBRTE_TIMER_DEBUG is disabled\n"); |
| 1055 | #endif |
| 1056 | } |
| 1057 | |
| 1058 | int |
| 1059 | rte_timer_dump_stats(FILE *f) |
no test coverage detected