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:44 -0700 |
commit | 33001fd7a7072d483272115a9376478fdc007fb9 (patch) | |
tree | 6a01a567ac1b665c34a2a7e97ece0bb2ea35b503 /contrib/auto_explain/auto_explain.c | |
parent | 5e22171310f8d7c82219a6b978440e5144e88683 (diff) | |
download | postgresql-33001fd7a7072d483272115a9376478fdc007fb9.tar.gz postgresql-33001fd7a7072d483272115a9376478fdc007fb9.zip |
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 'contrib/auto_explain/auto_explain.c')
-rw-r--r-- | contrib/auto_explain/auto_explain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/auto_explain/auto_explain.c b/contrib/auto_explain/auto_explain.c index 0c0eb3fb9e0..a19c1d2a3c3 100644 --- a/contrib/auto_explain/auto_explain.c +++ b/contrib/auto_explain/auto_explain.c @@ -362,9 +362,9 @@ explain_ExecutorEnd(QueryDesc *queryDesc) ExplainPrintPlan(es, queryDesc); if (es->analyze && auto_explain_log_triggers) ExplainPrintTriggers(es, queryDesc); - if (queryDesc->estate->es_jit && es->costs && - queryDesc->estate->es_jit->created_functions > 0) - ExplainPrintJIT(es, queryDesc); + if (es->costs) + ExplainPrintJIT(es, queryDesc->estate->es_jit_flags, + queryDesc->estate->es_jit_combined_instr, -1); ExplainEndOutput(es); /* Remove last line break */ |