about summary refs log tree commit diff stats
path: root/src/teliva.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-03-16 23:28:35 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-03-16 23:45:42 -0700
commit76d1dda2402d24f5f43387d13773b3c2d03e180b (patch)
tree8f778f59babc028d0bd640ed53b57539c78ccdfc /src/teliva.c
parent785dfaa1ec835ece03c019c203d54c68284c6ada (diff)
downloadteliva-76d1dda2402d24f5f43387d13773b3c2d03e180b.tar.gz
bring back hack when caller is main
Partially undoes commit f2d29c22f86a88.
Diffstat (limited to 'src/teliva.c')
-rw-r--r--src/teliva.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/teliva.c b/src/teliva.c
index 308d4a0..c85e823 100644
--- a/src/teliva.c
+++ b/src/teliva.c
@@ -369,6 +369,8 @@ void record_metadata_about_function_call (lua_State *L, CallInfo *ci) {
     const char* caller_name = name_of_global(L, ci, 1);
     if (caller_name)
       save_caller(L, function_name, caller_name);
+    else if (call_graph_depth == 3)
+      save_caller(L, function_name, "main");
   }
 }