arm-ehenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 13c5e19 was
13c5e19,
checked in by Thierry Delisle <tdelisle@…>, 3 years ago
|
- Moved snzi and subqueues outside of ready_queue.cfa.
- Added random.hfa with multiple prng.
- Minor optimizations to ready-queue
- Stats now track number of local pops( bias pops )
- Fixed stats for io
- Fixed calculaton of nprocessors
- Fixed IO to work with new ready-queue
|
-
Property mode set to
100644
|
File size:
2.2 KB
|
Line | |
---|
1 | #pragma once |
---|
2 | |
---|
3 | #include <stdint.h> |
---|
4 | |
---|
5 | #if defined(__CFA_NO_STATISTICS__) |
---|
6 | struct __stats_t; |
---|
7 | static inline void __init_stats( struct __stats_t * ) {} |
---|
8 | static inline void __tally_stats( struct __stats_t *, struct __stats_t * ) {} |
---|
9 | static inline void __print_stats( struct __stats_t * ) {} |
---|
10 | #else |
---|
11 | struct __attribute__((aligned(64))) __stats_readQ_t { |
---|
12 | struct { |
---|
13 | // Push statistic |
---|
14 | struct { |
---|
15 | // number of attemps at pushing something |
---|
16 | volatile uint64_t attempt; |
---|
17 | |
---|
18 | // number of attemps at pushing something something to preferred queues |
---|
19 | volatile uint64_t local; |
---|
20 | |
---|
21 | // number of successes at pushing |
---|
22 | volatile uint64_t success; |
---|
23 | } push; |
---|
24 | |
---|
25 | // Pop statistic |
---|
26 | struct { |
---|
27 | // number of reads of the mask |
---|
28 | // picking an empty __cfa_readyQ_mask_t counts here |
---|
29 | // but not as an attempt |
---|
30 | volatile uint64_t probe; |
---|
31 | |
---|
32 | // number of attemps at poping something |
---|
33 | volatile uint64_t attempt; |
---|
34 | |
---|
35 | // number of attemps at poping something from preferred queues |
---|
36 | volatile uint64_t local; |
---|
37 | |
---|
38 | // number of successes at poping |
---|
39 | volatile uint64_t success; |
---|
40 | } pop; |
---|
41 | } pick; |
---|
42 | struct { |
---|
43 | volatile uint64_t halts; |
---|
44 | volatile uint64_t cancels; |
---|
45 | volatile uint64_t wakes; |
---|
46 | volatile uint64_t exits; |
---|
47 | } sleep; |
---|
48 | }; |
---|
49 | |
---|
50 | #if defined(HAVE_LINUX_IO_URING_H) |
---|
51 | struct __attribute__((aligned(64))) __stats_io_t{ |
---|
52 | struct { |
---|
53 | struct { |
---|
54 | volatile uint64_t rdy; |
---|
55 | volatile uint64_t csm; |
---|
56 | volatile uint64_t avl; |
---|
57 | volatile uint64_t cnt; |
---|
58 | } submit_avg; |
---|
59 | struct { |
---|
60 | volatile uint64_t val; |
---|
61 | volatile uint64_t cnt; |
---|
62 | volatile uint64_t block; |
---|
63 | } look_avg; |
---|
64 | struct { |
---|
65 | volatile uint64_t val; |
---|
66 | volatile uint64_t cnt; |
---|
67 | volatile uint64_t block; |
---|
68 | } alloc_avg; |
---|
69 | } submit_q; |
---|
70 | struct { |
---|
71 | struct { |
---|
72 | volatile uint64_t val; |
---|
73 | volatile uint64_t slow_cnt; |
---|
74 | volatile uint64_t fast_cnt; |
---|
75 | } completed_avg; |
---|
76 | } complete_q; |
---|
77 | }; |
---|
78 | #endif |
---|
79 | |
---|
80 | struct __attribute__((aligned(128))) __stats_t { |
---|
81 | __stats_readQ_t ready; |
---|
82 | #if defined(HAVE_LINUX_IO_URING_H) |
---|
83 | __stats_io_t io; |
---|
84 | #endif |
---|
85 | }; |
---|
86 | |
---|
87 | void __init_stats ( struct __stats_t * ); |
---|
88 | void __tally_stats( struct __stats_t *, struct __stats_t * ); |
---|
89 | void __print_stats( struct __stats_t * ); |
---|
90 | #endif |
---|
91 | |
---|
Note: See
TracBrowser
for help on using the repository browser.