* Reserve space in the DSM segment for instrumentation data. */
| 3284 | * Reserve space in the DSM segment for instrumentation data. |
| 3285 | */ |
| 3286 | void |
| 3287 | ExecHashEstimate(HashState *node, ParallelContext *pcxt) |
| 3288 | { |
| 3289 | size_t size; |
| 3290 | |
| 3291 | /* don't need this if not instrumenting or no workers */ |
| 3292 | if (!node->ps.instrument || pcxt->nworkers == 0) |
| 3293 | return; |
| 3294 | |
| 3295 | size = mul_size(pcxt->nworkers, sizeof(HashInstrumentation)); |
| 3296 | size = add_size(size, offsetof(SharedHashInfo, hinstrument)); |
| 3297 | shm_toc_estimate_chunk(&pcxt->estimator, size); |
| 3298 | shm_toc_estimate_keys(&pcxt->estimator, 1); |
| 3299 | } |
| 3300 | |
| 3301 | /* |
| 3302 | * Set up a space in the DSM for all workers to record instrumentation data |
no test coverage detected