Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>,
	Sergey Bronnikov <estetus@gmail.com>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 3/3] sysprof: fix a message with stop without run
Date: Thu, 6 Mar 2025 18:18:48 +0300	[thread overview]
Message-ID: <3eca76ea-3cdc-4595-9b9b-c42a8d3fc082@tarantool.org> (raw)
In-Reply-To: <Z8hlRRm2n2m3r8m3@root>

[-- Attachment #1: Type: text/plain, Size: 2637 bytes --]

Hi, Sergey,

the patch series was rebased to the master branch (tarantool/master)

without conflicts.

Sergey

On 05.03.2025 17:52, Sergey Kaplun via Tarantool-patches wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, with a few nits regarding the commit message and 1 ignorable
> comment to the code style.
>
> On 25.02.25, Sergey Bronnikov wrote:
>> The function `misc.sysprof.stop()` reports that profiler is
> Typo: s/profiler/the profiler/
>
>> already running:
>>
>> | $ ./src/luajit -e 'print(misc.sysprof.stop())'
>> | nil     profiler is running already     22
>>
>> both in `sysprof_error()` and fixes aforementioned problem.
> Don't get this sentence.

Missed this comment.

Now commit message is updated, new version is below:

Author: Sergey Bronnikov <sergeyb@tarantool.org>
Date:   Tue Feb 4 11:48:05 2025 +0300

     sysprof: fix a message with stop without run

     When sysprof is not started the function `misc.sysprof.stop()`
     reports that profiler is already running:

     | $ ./src/luajit -e 'print(misc.sysprof.stop())'
     | nil     profiler is running already     22

     The patch fixes that:

     | $ ./src/luajit -e 'print(misc.sysprof.stop())'
     | nil     profiler is not running         22

     Follows up tarantool/tarantool#781

>
> Typo: s/aforementioned/the aforementioned/
>
>> Follows up tarantool/tarantool#781
>> ---
>>   src/lib_misc.c                                              | 6 ++++++
>>   .../tarantool-tests/profilers/misclib-sysprof-lapi.test.lua | 5 +++--
>>   2 files changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/lib_misc.c b/src/lib_misc.c
>> index c4b40996..74888d20 100644
>> --- a/src/lib_misc.c
>> +++ b/src/lib_misc.c
>> @@ -335,6 +335,12 @@ LJLIB_CF(misc_sysprof_stop)
>>     return prof_error(L, PROFILE_ERRUSE, err_details);
>>   #else
>>     int status = luaM_sysprof_stop(L);
>> +  if (LJ_UNLIKELY(status == PROFILE_ERRRUN)) {
>> +      lua_pushnil(L);
>> +      lua_pushstring(L, err2msg(LJ_ERR_PROF_NOTRUNNING));
>> +      lua_pushinteger(L, EINVAL);
>> +      return 3;
>> +  }
>>     if (LJ_UNLIKELY(status != PROFILE_SUCCESS))
> It looks like more natural now to use else if here now.
>
>>       return prof_error(L, status, NULL);
>>   
>> diff --git a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua
>> index ebd80cf6..770b5736 100644
>> --- a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua
>> +++ b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua
> <snipped>
>
>> -- 
>> 2.43.0
>>

[-- Attachment #2: Type: text/html, Size: 4148 bytes --]

  reply	other threads:[~2025-03-06 15:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  7:32 [Tarantool-patches] [PATCH luajit 0/3] Fix sysprof error on stop not started sysprof Sergey Bronnikov via Tarantool-patches
2025-02-25  7:32 ` [Tarantool-patches] [PATCH luajit 1/3] sysprof: rename sysprof_error to prof_error Sergey Bronnikov via Tarantool-patches
2025-03-05 14:28   ` Sergey Kaplun via Tarantool-patches
2025-02-25  7:32 ` [Tarantool-patches] [PATCH luajit 2/3] misc: use prof_error for handling errors Sergey Bronnikov via Tarantool-patches
2025-03-05 14:49   ` Sergey Kaplun via Tarantool-patches
2025-03-06 16:04     ` Sergey Bronnikov via Tarantool-patches
2025-02-25  7:32 ` [Tarantool-patches] [PATCH luajit 3/3] sysprof: fix a message with stop without run Sergey Bronnikov via Tarantool-patches
2025-03-05 14:52   ` Sergey Kaplun via Tarantool-patches
2025-03-06 15:18     ` Sergey Bronnikov via Tarantool-patches [this message]
2025-03-12 11:11 ` [Tarantool-patches] [PATCH luajit 0/3] Fix sysprof error on stop not started sysprof Sergey Kaplun via Tarantool-patches
2025-03-06 16:18 Sergey Bronnikov via Tarantool-patches
2025-03-06 16:19 ` [Tarantool-patches] [PATCH luajit 3/3] sysprof: fix a message with stop without run Sergey Bronnikov via Tarantool-patches
2025-03-07  7:21   ` Sergey Kaplun via Tarantool-patches
2025-03-07 10:44     ` Sergey Bronnikov 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=3eca76ea-3cdc-4595-9b9b-c42a8d3fc082@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=estetus@gmail.com \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 3/3] sysprof: fix a message with stop without run' \
    /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