diff options
author | Andres Freund <andres@anarazel.de> | 2018-09-25 12:54:29 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2018-09-25 13:12:45 -0700 |
commit | e63441c3f5ca4a3cdb47f9c7fed9e61dde17b60d (patch) | |
tree | 3e0af6f82dafca6e80d546939ba5ab61a151b227 /src/include/nodes/execnodes.h | |
parent | 9590f7d6c66321214926e13558c42f0099737ce4 (diff) |
Collect JIT instrumentation from workers.
Previously, when using parallel query, EXPLAIN (ANALYZE)'s JIT
compilation timings did not include the overhead from doing so on the
workers. Fix that.
We do so by simply aggregating the cost of doing JIT compilation on
workers and the leader together. Arguably that's not quite accurate,
because the total time spend doing so is spent in parallel - but it's
hard to do much better. For additional detail, when VERBOSE is
specified, the stats for workers are displayed separately.
Author: Amit Khandekar and Andres Freund
Discussion: https://postgr.es/m/CAJ3gD9eLrz51RK_gTkod+71iDcjpB_N8eC6vU2AW-VicsAERpQ@mail.gmail.com
Backpatch: 11-
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 4c155419462..2c1bdb60a53 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -569,9 +569,14 @@ typedef struct EState * JIT information. es_jit_flags indicates whether JIT should be performed * and with which options. es_jit is created on-demand when JITing is * performed. + * + * es_jit_combined_instr, at the end of query execution with + * instrumentation enabled, is the the combined instrumentation + * information of leader and followers. */ int es_jit_flags; struct JitContext *es_jit; + struct JitInstrumentation *es_jit_combined_instr; } EState; @@ -923,6 +928,9 @@ typedef struct PlanState Instrumentation *instrument; /* Optional runtime stats for this node */ WorkerInstrumentation *worker_instrument; /* per-worker instrumentation */ + /* Per-worker JIT instrumentation */ + struct SharedJitInstrumentation *worker_jit_instrument; + /* * Common structural data for all Plan types. These links to subsidiary * state trees parallel links in the associated plan tree (except for the |