From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 0A5B1559A02; Wed, 2 Aug 2023 11:56:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0A5B1559A02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1690966585; bh=6g2Jo/im2ZlbbmW4caZIvI6cbCWaR9Hjk6xcUqi5H74=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=l78d8VSzeTWRLkgFWXEpbiqxL81klB4dwEJGX1rvZgMNGwUCwJuH/u4g6Kdq6rmzb lstOlJVWk4jV9vRgiKOohlCR0x86LigG7lQ1pQXGHA5nw6WG6e4fE1/jmnVTQdLUdK BjtB6QPohep6tyn6Xx3zbi7+/sJyIXfTtSJoGeQ4= Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1AF0B559A02 for ; Wed, 2 Aug 2023 11:55:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1AF0B559A02 Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-522bc9556f5so5435286a12.0 for ; Wed, 02 Aug 2023 01:55:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690966537; x=1691571337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FBLM5VjnqGl1tCNYZJTZB7dP2/+KRbJKxUaebbtvwq8=; b=LPRP5ZZ05mwpzaum4kpuI9sxKld/HpXPcBdfTZ/JNP38hqnQMS+ECnOdMbIm+JgXhP F/u3zF3ba1WGLP2oYJ8zX2hBSTTnNW9FIgU60/0C7iaTH4/fie3WB8MbNXax/PwAu5Se UZxUyO3GD5rOaMIMD+Pv3BTkJfahRpkkzTOOvvDFyNGX77br6lUDmmHPYB7P+iZoAkFw 79neyLYry5RpMoFcXBftzz8NAHzQu3xL8mBJRTZhXgNLkLvhm8d5Wbbfe8dl9C4/V/xZ rtc6RrTnDhyu5RE+JVfaA9Lwo0hZXJSCPijR82/HERTSVVt8OLx0SlMzjuZKX1RgQSau +Ysw== X-Gm-Message-State: ABy/qLbhVMjFLMWXAvSAqzDLHEFjrJJ+i7g/nvWmk45xuY6cVDk5/IRy 0At/2gH56N60Grt+l0P32JhBI2rUhyM= X-Google-Smtp-Source: APBJJlFKIkmr400q4BwEpbeIxsRZujjQBm2Ub8Kn+vF8e11H0EkSP3fxupwmWNxvxHRJAz2SFXQE1Q== X-Received: by 2002:a17:906:5198:b0:973:fd02:a41f with SMTP id y24-20020a170906519800b00973fd02a41fmr5122413ejk.40.1690966536850; Wed, 02 Aug 2023 01:55:36 -0700 (PDT) Received: from pony.. ([185.6.247.97]) by smtp.gmail.com with ESMTPSA id jt9-20020a170906dfc900b0098dfec235ccsm8780125ejc.47.2023.08.02.01.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 01:55:36 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com Date: Wed, 2 Aug 2023 11:52:20 +0300 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/5][v3] codehealth: fix typos X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Fix typos found with codespell in files with our own source code. --- src/lj_sysprof.c | 2 +- src/lj_wbuf.h | 2 +- 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 ++-- 19 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/lj_sysprof.c b/src/lj_sysprof.c index 2e9ed9b3..745eb1a3 100644 --- a/src/lj_sysprof.c +++ b/src/lj_sysprof.c @@ -485,7 +485,7 @@ int lj_sysprof_stop(lua_State *L) if (SPS_HALT == sp->state) { errno = sp->saved_errno; sp->state = SPS_IDLE; - /* wbuf was terminated when error occured. */ + /* wbuf was terminated when error occurred. */ return PROFILE_ERRIO; } diff --git a/src/lj_wbuf.h b/src/lj_wbuf.h index 9eaa5e51..33ec8463 100644 --- a/src/lj_wbuf.h +++ b/src/lj_wbuf.h @@ -75,7 +75,7 @@ void lj_wbuf_addn(struct lj_wbuf *buf, const void *src, size_t n); /* Write string to the buffer. */ void LJ_FASTCALL lj_wbuf_addstring(struct lj_wbuf *buf, const char *s); -/* Immediatly flush the buffer. */ +/* Immediately flush the buffer. */ void LJ_FASTCALL lj_wbuf_flush(struct lj_wbuf *buf); /* Check flags. */ diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py index 96ee2289..afdfecd9 100644 --- a/src/luajit-gdb.py +++ b/src/luajit-gdb.py @@ -268,7 +268,7 @@ def strdata(obj): try: return str(cast('char *', cast('GCstr *', obj) + 1))[len(PADDING):] except UnicodeEncodeError: - return "" + return "" def itypemap(o): if LJ_64 and not LJ_GC64: @@ -606,7 +606,7 @@ class LJDumpTable(LJBase): ''' lj-tab -The command receives a GCtab adress and dumps the table contents: +The command receives a GCtab address and dumps the table contents: * Metatable address whether the one is set * Array part slots: : []: @@ -677,7 +677,7 @@ coroutine guest stack: + CP: Protected C frame + PP: VM performs a call as a result of executinig pcall or xpcall -If L is ommited the main coroutine is used. +If L is omitted the main coroutine is used. ''' def invoke(self, arg, from_tty): diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py index 9ee10269..4d7bef81 100644 --- a/src/luajit_lldb.py +++ b/src/luajit_lldb.py @@ -490,7 +490,7 @@ def strdata(obj): ptr = cast('char *', obj + 1) return ptr.summary except UnicodeEncodeError: - return "" + return "" def itype(o): return tou32(o.it64 >> 47) if LJ_GC64 else o.it @@ -909,7 +909,7 @@ class LJDumpTable(Command): ''' lj-tab -The command receives a GCtab adress and dumps the table contents: +The command receives a GCtab address and dumps the table contents: * Metatable address whether the one is set * Array part slots: : []: @@ -979,7 +979,7 @@ coroutine guest stack: + CP: Protected C frame + PP: VM performs a call as a result of executinig pcall or xpcall -If L is ommited the main coroutine is used. +If L is omitted the main coroutine is used. ''' def execute(self, debugger, args, result): l = self.parse(args) diff --git a/test/LuaJIT-tests/src/ctest.c b/test/LuaJIT-tests/src/ctest.c index d257567b..e99f2306 100644 --- a/test/LuaJIT-tests/src/ctest.c +++ b/test/LuaJIT-tests/src/ctest.c @@ -234,7 +234,7 @@ static int costatus(lua_State *L, lua_State *co) { else return CO_SUS; /* initial state */ } - default: /* some error occured */ + default: /* some error occurred */ return CO_DEAD; } } diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index 6218f76a..f0bf8efb 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -132,7 +132,7 @@ else() endif() # LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list -# with dependecies are set in scope of BuildTestLib macro. +# with dependencies are set in scope of BuildTestLib macro. add_custom_target(tarantool-tests DEPENDS ${LUAJIT_TEST_BINARY} ${TESTLIBS} ) diff --git a/test/tarantool-tests/fix-emit-rma.test.lua b/test/tarantool-tests/fix-emit-rma.test.lua index 42804447..cc97ff4d 100644 --- a/test/tarantool-tests/fix-emit-rma.test.lua +++ b/test/tarantool-tests/fix-emit-rma.test.lua @@ -4,7 +4,7 @@ local test = tap.test('fix-emit-rma'):skipcond({ ['Test requires GC64 mode enabled'] = not require('ffi').abi('gc64'), }) --- Need to test 2 cases of `emit_rma()` particulary on x64: +-- Need to test 2 cases of `emit_rma()` particularly on x64: -- * `IR_LDEXP` with `fld` instruction for loading constant -- number `TValue` by address. -- * `IR_OBAR` with the corresponding `test` instruction on diff --git a/test/tarantool-tests/gh-4199-gc64-fuse.test.lua b/test/tarantool-tests/gh-4199-gc64-fuse.test.lua index ca050cf0..877f7884 100644 --- a/test/tarantool-tests/gh-4199-gc64-fuse.test.lua +++ b/test/tarantool-tests/gh-4199-gc64-fuse.test.lua @@ -44,7 +44,7 @@ for n = 1, 100 do for i = 1, 5 do -- This constant fusion leads to the test failure. a[i] = 0 - -- This summ is not necessarry but decreases the amount of + -- This summ is not necessary but decreases the amount of -- iterations. a[i] = a[i] + x + y -- Use all FPR registers and one value from the memory diff --git a/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua b/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua index 097e771c..00f58642 100644 --- a/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua +++ b/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua @@ -1,6 +1,6 @@ local tap = require('tap') --- Test file to check correctnes of external unwinding +-- Test file to check correctness of external unwinding -- in LuaJIT. -- See also https://github.com/LuaJIT/LuaJIT/issues/698, -- https://github.com/LuaJIT/LuaJIT/pull/757. diff --git a/test/tarantool-tests/gh-6163-min-max.test.lua b/test/tarantool-tests/gh-6163-min-max.test.lua index 63437955..3b7a8e03 100644 --- a/test/tarantool-tests/gh-6163-min-max.test.lua +++ b/test/tarantool-tests/gh-6163-min-max.test.lua @@ -53,7 +53,7 @@ local x = 1 jit.opt.start('hotloop=1') --- XXX: Looping over the operations and their arguments breakes the +-- XXX: Looping over the operations and their arguments breaks the -- semantics of some optimization tests below. The cases are -- copy-pasted to preserve optimization semantics. diff --git a/test/tarantool-tests/lj-416-xor-before-jcc.test.lua b/test/tarantool-tests/lj-416-xor-before-jcc.test.lua index 605bb92a..f71c9ee4 100644 --- a/test/tarantool-tests/lj-416-xor-before-jcc.test.lua +++ b/test/tarantool-tests/lj-416-xor-before-jcc.test.lua @@ -41,7 +41,7 @@ local testxor = ffi.load('libtestxor') -- pressure and specific registers allocations. local handler = setmetatable({}, { __newindex = function () - -- 0 and nil are suggested as differnt constant-zero values + -- 0 and nil are suggested as different constant-zero values -- for the call and occupied different registers. testxor.test_xor_func(0, 0, 0, 0, 0, 0, nil, 0) end diff --git a/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua b/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua index a689ed60..ea01ba06 100644 --- a/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua +++ b/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua @@ -14,7 +14,7 @@ do -- The function's prototype is created with the following -- constants at chunk parsing. After adding this constant to -- the function's prototype it will be marked as gray during - -- propogate phase. + -- propagate phase. local function usets() uv = '' end _G.usets = usets end diff --git a/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua b/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua index a282a10f..f02bd05f 100644 --- a/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua +++ b/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua @@ -20,9 +20,9 @@ local finish = os.clock() profile.stop() --- XXX: The bug is occured as stopping of callbacks invocation, +-- XXX: The bug is occurred as stopping of callbacks invocation, -- when a new tick strikes inside `gc_call_finalizer()`. --- The amount of successfull callbacks isn't stable (2-15). +-- The amount of successful callbacks isn't stable (2-15). -- So, assume that amount of profiling samples should be at least -- more than 0.5 intervals of time during sampling. test:ok(nsamples >= 0.5 * (finish - start) * 1e3 / INTERVAL, diff --git a/test/tarantool-tests/lj-603-err-snap-restore.test.lua b/test/tarantool-tests/lj-603-err-snap-restore.test.lua index 791107ba..96ebf92c 100644 --- a/test/tarantool-tests/lj-603-err-snap-restore.test.lua +++ b/test/tarantool-tests/lj-603-err-snap-restore.test.lua @@ -11,7 +11,7 @@ local function do_test() local recursive_f local function errfunc() xpcall(recursive_f, errfunc) - -- Since this error is occured on snapshot restoration and can + -- Since this error is occurred on snapshot restoration and can -- be handled by compiler itself, we shouldn't bother a user -- with it. handler_is_called = true diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua b/test/tarantool-tests/misclib-memprof-lapi.test.lua index 3cb5c8be..20cfef21 100644 --- a/test/tarantool-tests/misclib-memprof-lapi.test.lua +++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua @@ -52,13 +52,13 @@ local function generate_output(filename, payload) collectgarbage() local res, err = misc.memprof.start(filename) - -- Should start succesfully. + -- Should start successfully. assert(res, err) payload() res, err = misc.memprof.stop() - -- Should stop succesfully. + -- Should stop successfully. assert(res, err) end @@ -188,7 +188,7 @@ test:test("output", function(subtest) -- Check allocation reports. The second argument is a line -- number of the allocation event itself. The third is a line -- number of the corresponding function definition. The last - -- one is the number of allocations. 1 event - alocation of + -- one is the number of allocations. 1 event - allocation of -- table by itself + 1 allocation of array part as far it is -- bigger than LJ_MAX_COLOSIZE (16). subtest:ok(check_alloc_report(alloc, { line = 37, linedefined = 35 }, 2)) diff --git a/test/tarantool-tests/tap.lua b/test/tarantool-tests/tap.lua index 8559ee52..55b7dd72 100644 --- a/test/tarantool-tests/tap.lua +++ b/test/tarantool-tests/tap.lua @@ -1,6 +1,6 @@ --- tap.lua internal file. --- ---- The Test Anything Protocol vesion 13 producer. +--- The Test Anything Protocol version 13 producer. --- -- Initializer FFI for check. @@ -79,7 +79,7 @@ local function ok(test, cond, message, extra) io.write(tindent, ("line:\t%s\n"):format(trace[#trace].line)) for frameno, frame in ipairs(trace) do io.write(tindent, ("frame #%d\n"):format(frameno)) - -- XXX: Use "half indent" to dump fiels. + -- XXX: Use "half indent" to dump fields. local findent = indent(0.5) .. tindent for key, value in pairs(frame) do io.write(findent, ("%s:\t%s\n"):format(key, value)) diff --git a/test/tarantool-tests/unit-jit-parse.test.lua b/test/tarantool-tests/unit-jit-parse.test.lua index 2e6a2228..c0e699c2 100644 --- a/test/tarantool-tests/unit-jit-parse.test.lua +++ b/test/tarantool-tests/unit-jit-parse.test.lua @@ -39,7 +39,7 @@ local loop_trace = traces[1] for irnum = 1, N_TESTS do local ir_pattern = expected_irs[irnum] local irref = loop_trace:has_ir(ir_pattern) - test:ok(irref, 'find IR refernce by pattern: ' .. ir_pattern) + test:ok(irref, 'find IR reference by pattern: ' .. ir_pattern) end test:done(true) 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.34.1