Measure the cycle cost of popping an empty stack. */
| 107 | |
| 108 | /* Measure the cycle cost of popping an empty stack. */ |
| 109 | static void |
| 110 | test_empty_pop(struct rte_stack *s) |
| 111 | { |
| 112 | unsigned int iterations = 100000000; |
| 113 | void *objs[MAX_BURST]; |
| 114 | unsigned int i; |
| 115 | |
| 116 | uint64_t start = rte_rdtsc(); |
| 117 | |
| 118 | for (i = 0; i < iterations; i++) |
| 119 | rte_stack_pop(s, objs, bulk_sizes[0]); |
| 120 | |
| 121 | uint64_t end = rte_rdtsc(); |
| 122 | |
| 123 | printf("Stack empty pop: %.2F\n", |
| 124 | (double)(end - start) / iterations); |
| 125 | } |
| 126 | |
| 127 | struct thread_args { |
| 128 | struct rte_stack *s; |
no test coverage detected