MCPcopy Create free account
hub / github.com/F-Stack/f-stack / __rte_timer_dump_stats

Function __rte_timer_dump_stats

dpdk/lib/timer/rte_timer.c:1033–1056  ·  view source on GitHub ↗

dump statistics about timers */

Source from the content-addressed store, hash-verified

1031
1032/* dump statistics about timers */
1033static 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
1058int
1059rte_timer_dump_stats(FILE *f)

Callers 1

rte_timer_alt_dump_statsFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected