[Tarantool-patches] [PATCH 1/2] test: fix typos

Sergey Kaplun skaplun at tarantool.org
Fri Jul 14 14:53:58 MSK 2023


Hi, Sergey!
Thanks for the patch!
LGTM, except some comments below:

1) I suppose it should be named `refactoring: fix typos`, since we also
changed debugger scripts and tools files. Feel free to split this commit
into three for each subsystem, but I see no need in this.

On 11.07.23, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb at tarantool.org>
> 
> Fix typos found with codespell in a files with our own source code.

Typo: s/a files/files/

> ---
>  src/luajit-gdb.py                                           | 6 +++---
>  src/luajit_lldb.py                                          | 6 +++---
>  test/LuaJIT-tests/src/ctest.c                               | 2 +-
>  test/tarantool-tests/CMakeLists.txt                         | 2 +-
>  test/tarantool-tests/fix-emit-rma.test.lua                  | 2 +-
>  test/tarantool-tests/gh-4199-gc64-fuse.test.lua             | 2 +-
>  .../gh-6096-external-unwinding-on-arm64.test.lua            | 2 +-
>  test/tarantool-tests/gh-6163-min-max.test.lua               | 2 +-
>  test/tarantool-tests/lj-416-xor-before-jcc.test.lua         | 2 +-
>  .../lj-426-arm64-incorrect-check-closed-uv.test.lua         | 2 +-
>  .../lj-512-profiler-hook-finalizers.test.lua                | 4 ++--
>  test/tarantool-tests/lj-603-err-snap-restore.test.lua       | 2 +-
>  test/tarantool-tests/misclib-memprof-lapi.test.lua          | 6 +++---
>  test/tarantool-tests/tap.lua                                | 4 ++--
>  test/tarantool-tests/unit-jit-parse.test.lua                | 2 +-
>  tools/memprof/parse.lua                                     | 4 ++--
>  tools/memprof/process.lua                                   | 4 ++--
>  17 files changed, 27 insertions(+), 27 deletions(-)
> 

<snipped>

> diff --git a/tools/memprof/parse.lua b/tools/memprof/parse.lua
> index d865267b..2c09db90 100644
> --- a/tools/memprof/parse.lua
> +++ b/tools/memprof/parse.lua
> @@ -52,14 +52,14 @@ local function link_to_previous(heap_chunk, e, nsize)
>      if not e.primary[heap_chunk[2]] then
>        e.primary[heap_chunk[2]] = {
>          loc = heap_chunk[3],
> -        alloced = 0,
> +        allocated = 0,
>          freed = 0,
>          count = 0,
>        }
>      end
>      -- Save information about delta for memory heap.
>      local location_data = e.primary[heap_chunk[2]]
> -    location_data.alloced = location_data.alloced + nsize
> +    location_data.allocated = location_data.allocated + nsize
>      location_data.freed = location_data.freed + heap_chunk[1]
>      location_data.count = location_data.count + 1
>    end
> diff --git a/tools/memprof/process.lua b/tools/memprof/process.lua
> index 0bcb965b..9dc202ae 100644
> --- a/tools/memprof/process.lua
> +++ b/tools/memprof/process.lua
> @@ -39,8 +39,8 @@ function M.form_heap_delta(events, symbols)
>        for _, heap_chunk in pairs(event.primary) do
>          local ev_line = symtab.demangle(symbols, heap_chunk.loc)
>  
> -        if (heap_chunk.alloced > 0) then
> -          dheap[ev_line].dbytes = dheap[ev_line].dbytes + heap_chunk.alloced
> +        if (heap_chunk.allocated > 0) then
> +          dheap[ev_line].dbytes = dheap[ev_line].dbytes + heap_chunk.allocated
>            dheap[ev_line].nalloc = dheap[ev_line].nalloc + heap_chunk.count
>          end

2) Can we avoid such changes in the not-string/non-comment chunks?

>  
> -- 
> 2.34.1
> 

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list