about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-03-16 20:29:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-03-16 20:29:50 -0700
commit709cc25130de225d3c89cc4ac5ab669cdc8b9dcb (patch)
tree98971a38bdccdc51cacc58a40c3a32ee400516b9 /src
parentb9c187d2594953267357ef37e352d425c7fbeafe (diff)
downloadteliva-709cc25130de225d3c89cc4ac5ab669cdc8b9dcb.tar.gz
start cleaning up function call instrumentation
It's a mess. I calculate call-graph depth one way and calculate caller
names another way. At least one of the ways fails to work with indirect
calls. Hopefully the other way works?
Diffstat (limited to 'src')
-rw-r--r--src/teliva.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/teliva.c b/src/teliva.c
index 6bcdf7f..549d99b 100644
--- a/src/teliva.c
+++ b/src/teliva.c
@@ -320,7 +320,7 @@ void append_string_to_array(lua_State* L, int array_index, const char* s) {
   lua_rawseti(L, array_index, new_index);
 }
 
-extern void save_caller_as(lua_State* L, const char* name, const char* caller_name);
+static void save_caller_as(lua_State* L, const char* name, const char* caller_name);
 void save_caller(lua_State* L, const char* name, int call_graph_depth) {
   lua_Debug ar;
   lua_getstack(L, 1, &ar);
@@ -328,7 +328,7 @@ void save_caller(lua_State* L, const char* name, int call_graph_depth) {
   if (ar.name) save_caller_as(L, name, ar.name);
 }
 
-void save_caller_as(lua_State* L, const char* name, const char* caller_name) {
+static void save_caller_as(lua_State* L, const char* name, const char* caller_name) {
   // push table of caller tables
   luaL_newmetatable(L, "__teliva_caller");
   int ct = lua_gettop(L);