Commit 513b7986 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add a hook to tell us what functions are taking a long time to JIT (spoiler:...

Add a hook to tell us what functions are taking a long time to JIT (spoiler: still sre_parse.py::_parse)
parent 251f417a
...@@ -205,6 +205,10 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E ...@@ -205,6 +205,10 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E
long us = _t.end(); long us = _t.end();
static StatCounter us_compiling("us_compiling"); static StatCounter us_compiling("us_compiling");
us_compiling.log(us); us_compiling.log(us);
if (VERBOSITY() >= 1 && us > 100000) {
printf("Took %ldms to compile %s::%s!\n", us / 1000, source->parent_module->fn.c_str(), name.c_str());
}
static StatCounter num_compiles("num_compiles"); static StatCounter num_compiles("num_compiles");
num_compiles.log(); num_compiles.log();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment