diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-01-03 13:26:38 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-01-03 13:26:38 -0800 |
commit | 7812ebc5f119cd4c47e6a91db0561008c7080bc5 (patch) | |
tree | e57163280775e4608c2f03f84940f39e48f07c38 /src/ldo.c | |
parent | 1c78ab3d2e380ca633a3812e4779de0e67abf3d6 (diff) | |
download | teliva-7812ebc5f119cd4c47e6a91db0561008c7080bc5.tar.gz |
start saving callers of functions
I think this is significantly slowing things down. Perhaps we should sample or something.
Diffstat (limited to 'src/ldo.c')
-rw-r--r-- | src/ldo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ldo.c b/src/ldo.c index de2ccdd..6316b24 100644 --- a/src/ldo.c +++ b/src/ldo.c @@ -30,7 +30,7 @@ #include "lundump.h" #include "lvm.h" #include "lzio.h" - +#include "teliva.h" @@ -283,7 +283,9 @@ void record_metadata_about_function_call (lua_State *L, CallInfo *ci) { return; int g = GETARG_Bx(i); /* global index */ lua_assert(ttisstring(&p->k[g])); - assign_call_graph_depth_to_name(L, ci - L->base_ci, svalue(&p->k[g])); + const char* function_name = svalue(&p->k[g]); + assign_call_graph_depth_to_name(L, ci - L->base_ci, function_name); + save_caller(L, function_name); } |