Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e5b2bd0

Browse files
committed
auto_explain: Include JIT information if applicable.
Due to my (Andres') omission auto_explain did not include information about JIT compilation. Fix that. Author: Lukas Fittl Discussion: https://postgr.es/m/CAP53PkzgSyoTCau0-5FNaM484B=uO8nLzma7L1ncWLb1=oVJQA@mail.gmail.com Backpatch: 11-, where JIT compilation was introduced
1 parent 6859bd2 commit e5b2bd0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/auto_explain/auto_explain.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "commands/explain.h"
1818
#include "executor/instrument.h"
19+
#include "jit/jit.h"
1920
#include "utils/guc.h"
2021

2122
PG_MODULE_MAGIC;
@@ -334,6 +335,9 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
334335
ExplainPrintPlan(es, queryDesc);
335336
if (es->analyze && auto_explain_log_triggers)
336337
ExplainPrintTriggers(es, queryDesc);
338+
if (queryDesc->estate->es_jit && es->costs &&
339+
queryDesc->estate->es_jit->created_functions > 0)
340+
ExplainPrintJIT(es, queryDesc);
337341
ExplainEndOutput(es);
338342

339343
/* Remove last line break */

0 commit comments

Comments
 (0)