summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mempool.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-09 14:27:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-09 15:27:32 +0100
commit084dc96bc564b814b7d8850958613cfae835dc77 (patch)
treea33bbbb6dac6c4277389478b154f2b4306eacb34 /src/lua/lua_mempool.c
parent0ebcb5c9fb90363a2afff95f3f1af827fcf9b287 (diff)
downloadrspamd-084dc96bc564b814b7d8850958613cfae835dc77.tar.gz
rspamd-084dc96bc564b814b7d8850958613cfae835dc77.zip
[Feature] Add support for Lua API tracing
Diffstat (limited to 'src/lua/lua_mempool.c')
-rw-r--r--src/lua/lua_mempool.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lua/lua_mempool.c b/src/lua/lua_mempool.c
index 3ace7055d..e5cb94219 100644
--- a/src/lua/lua_mempool.c
+++ b/src/lua/lua_mempool.c
@@ -152,6 +152,7 @@ rspamd_lua_check_mempool (lua_State * L, gint pos)
static int
lua_mempool_create (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_mempool_new (
rspamd_mempool_suggest_size (), "lua"), **pmempool;
@@ -183,6 +184,7 @@ lua_mempool_destructor_func (gpointer p)
static int
lua_mempool_add_destructor (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
struct lua_mempool_udata *ud;
@@ -213,6 +215,7 @@ lua_mempool_add_destructor (lua_State *L)
static int
lua_mempool_delete (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
if (mempool) {
@@ -229,6 +232,7 @@ lua_mempool_delete (lua_State *L)
static int
lua_mempool_stat (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
if (mempool) {
@@ -244,6 +248,7 @@ lua_mempool_stat (lua_State *L)
static int
lua_mempool_suggest_size (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
if (mempool) {
@@ -265,6 +270,7 @@ struct lua_numbers_bucket {
static int
lua_mempool_set_bucket (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
const gchar *var = luaL_checkstring (L, 2);
struct lua_numbers_bucket *bucket;
@@ -301,6 +307,7 @@ lua_mempool_set_bucket (lua_State *L)
static int
lua_mempool_set_variable (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
const gchar *var = luaL_checkstring (L, 2);
gpointer value;
@@ -400,6 +407,7 @@ lua_mempool_set_variable (lua_State *L)
static int
lua_mempool_get_variable (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
const gchar *var = luaL_checkstring (L, 2);
const gchar *type = NULL, *pt;
@@ -516,6 +524,7 @@ lua_mempool_get_variable (lua_State *L)
static int
lua_mempool_has_variable (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
const gchar *var = luaL_checkstring (L, 2);
gboolean ret = FALSE;
@@ -534,6 +543,7 @@ lua_mempool_has_variable (lua_State *L)
static int
lua_mempool_delete_variable (lua_State *L)
{
+ LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
const gchar *var = luaL_checkstring (L, 2);
gboolean ret = FALSE;