Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, imun@tarantool.org,
	skaplun@tarantool.org
Subject: [Tarantool-patches] [PATCH] sysprof: make sysprof internal API funcs static
Date: Wed, 11 May 2022 11:25:21 +0300	[thread overview]
Message-ID: <20220511082521.389687-5-m.kokryashkin@tarantool.org> (raw)
In-Reply-To: <20220511082521.389687-1-m.kokryashkin@tarantool.org>

Make sysprof internal Lua API functions static to avoid their exposure.

Part of tarantool/tarantool#781
---
Branch: https://github.com/tarantool/luajit/tree/fckxorg/sysprof-rc-full-ci

 src/lib_misc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib_misc.c b/src/lib_misc.c
index 370307a7..01dc1bea 100644
--- a/src/lib_misc.c
+++ b/src/lib_misc.c
@@ -162,7 +162,7 @@ static int on_stop_cb_default(void *opt, uint8_t *buf)
 #define SYSPROF_DEFAULT_INTERVAL 10
 #define SYSPROF_DEFAULT_OUTPUT "sysprof.bin"
 
-int set_output_path(const char *path, struct luam_Sysprof_Options *opt) {
+static int set_output_path(const char *path, struct luam_Sysprof_Options *opt) {
   struct profile_ctx *ctx = opt->ctx;
   int fd = 0;
   lua_assert(path != NULL);
@@ -174,7 +174,7 @@ int set_output_path(const char *path, struct luam_Sysprof_Options *opt) {
   return PROFILE_SUCCESS;
 }
 
-int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, int idx) {
+static int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, int idx) {
   GCtab *options = lj_lib_checktab(L, idx);
 
   /* Get profiling mode. */
@@ -248,7 +248,7 @@ int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, int idx)
   return PROFILE_SUCCESS;
 }
 
-int parse_options(lua_State *L, struct luam_Sysprof_Options *opt)
+static int parse_options(lua_State *L, struct luam_Sysprof_Options *opt)
 {
   if (lua_gettop(L) != 1)
     return PROFILE_ERRUSE;
@@ -259,7 +259,7 @@ int parse_options(lua_State *L, struct luam_Sysprof_Options *opt)
   return parse_sysprof_opts(L, opt, 1);
 }
 
-int sysprof_error(lua_State *L, int status)
+static int sysprof_error(lua_State *L, int status)
 {
   switch (status) {
     case PROFILE_ERRUSE:
-- 
2.35.1


  parent reply	other threads:[~2022-05-11  8:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  8:25 [Tarantool-patches] [PATCH] sysprof: add `LUAJIT_DISABLE_SYSPROF` to Makefile Maxim Kokryashkin via Tarantool-patches
2022-05-11  8:25 ` [Tarantool-patches] [PATCH] sysprof: change C configuration API Maxim Kokryashkin via Tarantool-patches
2022-05-18 14:20   ` Igor Munkin via Tarantool-patches
2022-05-19  6:56     ` Sergey Kaplun via Tarantool-patches
2022-05-11  8:25 ` [Tarantool-patches] [PATCH] sysprof: enrich symtab on a new trace or a proto Maxim Kokryashkin via Tarantool-patches
2022-05-19 14:07   ` Sergey Kaplun via Tarantool-patches
2022-05-11  8:25 ` [Tarantool-patches] [PATCH] sysprof: fix `SYSPROF_HANDLER_STACK_DEPTH` Maxim Kokryashkin via Tarantool-patches
2022-05-18 11:06   ` Igor Munkin via Tarantool-patches
2022-05-19  5:23   ` Sergey Kaplun via Tarantool-patches
2022-05-26 16:28   ` Igor Munkin via Tarantool-patches
2022-05-11  8:25 ` Maxim Kokryashkin via Tarantool-patches [this message]
2022-05-18  9:49   ` [Tarantool-patches] [PATCH] sysprof: make sysprof internal API funcs static Sergey Kaplun via Tarantool-patches
2022-05-18 11:01   ` Igor Munkin via Tarantool-patches
2022-05-26 16:28   ` Igor Munkin via Tarantool-patches
2022-05-18 10:01 ` [Tarantool-patches] [PATCH] sysprof: add `LUAJIT_DISABLE_SYSPROF` to Makefile Sergey Kaplun via Tarantool-patches
2022-05-18 10:58 ` Igor Munkin via Tarantool-patches
2022-05-26 16:25 ` Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220511082521.389687-5-m.kokryashkin@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] sysprof: make sysprof internal API funcs static' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox