Skip to content

Commit 38de339

Browse files
committed
logging
1 parent 5c2a280 commit 38de339

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/discof/rpcserver/fd_rpc_history.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ typedef struct fd_rpc_shred_map_elem fd_rpc_shred_map_elem_t;
9191
#define POOL_T fd_rpc_shred_map_elem_t
9292
#include "../../util/tmpl/fd_pool.c"
9393

94-
#define FD_SHRED_MAP_COL_CNT (64UL)
94+
#define FD_SHRED_MAP_COL_CNT (1UL<<10)
9595
struct fd_rpc_shred_map {
9696
struct fd_rpc_shred_map_column {
9797
ulong max_idx; /* The max shred index set in this column + 1 */
@@ -141,7 +141,7 @@ fd_rpc_history_create(fd_rpcserver_args_t * args) {
141141
mem = fd_spad_alloc( spad, alignof(fd_rpc_shred_map_t), sizeof(fd_rpc_shred_map_t) );
142142
memset(mem, 0, sizeof(fd_rpc_shred_map_t));
143143
hist->shred_map = (fd_rpc_shred_map_t *)mem;
144-
static const ulong shred_pool_sz = 1024UL * 128UL;
144+
static const ulong shred_pool_sz = 1024UL * 256UL;
145145
mem = fd_spad_alloc( spad, fd_rpc_shred_pool_align(), fd_rpc_shred_pool_footprint( shred_pool_sz ) );
146146
hist->shred_pool = fd_rpc_shred_pool_join( fd_rpc_shred_pool_new( mem, shred_pool_sz ) );
147147

@@ -180,11 +180,15 @@ fd_rpc_history_alloc_block(fd_rpc_history_t * hist, ulong slot) {
180180
void
181181
fd_rpc_history_debug(fd_rpc_history_t * hist) {
182182
fd_rpc_shred_map_t * shred_map = hist->shred_map;
183+
ulong tot_cnt = 0;
183184
for( ulong slot = shred_map->tail; slot < shred_map->head; slot++ ) {
184185
ulong col_idx = slot & (FD_SHRED_MAP_COL_CNT - 1);
185186
struct fd_rpc_shred_map_column * col = &shred_map->cols[col_idx];
186187
FD_LOG_NOTICE(( "slot %lu: %lu shreds, %lu max, %d end_found", slot, col->used_cnt, col->max_idx, (int)col->end_found ));
188+
tot_cnt += col->used_cnt;
187189
}
190+
FD_LOG_NOTICE(( "%lu head, %lu tail, %lu total shreds, %lu total blocks",
191+
shred_map->head, shred_map->tail, tot_cnt, shred_map->head - shred_map->tail ));
188192
}
189193

190194
void

0 commit comments

Comments
 (0)