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 CD05812EB014; Thu, 20 Feb 2025 14:24:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CD05812EB014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1740050677; bh=VOkhZlqeBVLvhc3b4trM65IKN1XkpN1UOwURqNa4D8A=; 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=B4OQh8W72dTq4fcm787lsuohuneUvMLMtB7oBOxUAH+IzfDMBcdUvl3/eSXfAqppG ZK+2Q/SmQX5E9PkYmprFOtfBNk5L0zq5FFqfJ/f2WNJ6jUE/Z/U99vVspMB6wdRrIi qc++YB57daM24XxM5ihA4MVhfTSnez7UdLlo4Wps= Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 DBB0312EB014 for ; Thu, 20 Feb 2025 14:22:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DBB0312EB014 Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-abbec6a0bfeso139135266b.2 for ; Thu, 20 Feb 2025 03:22:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740050557; x=1740655357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w+5bw9pdKHiHEJ+byq4CKlSg13o9a6mAPQ+PiEmemUg=; b=E4iMAQlkgooE4lOcsi/Tk2VIP6YjUzAiuEHLu4dPl5lrS0Z2LNrsBr3vW+FHfAAeZD vWkBPdaWMgVt2tpIEiMeTnMGwceupndxF5UTjQGZT12vxqP8csUgVzTdUkwILVxeDT1R 2JoSc85F/qtFXDGV4LwJPPhARWth0YpcKz/kUKhx/bZtChBzRWX/sofgP3TomTssdRcn KAkmc63EIRW9rXQzjXxnYMCHa6N9u/9rJdLpfAcexMLusAWY4G1Ko08GwAcUpGbogSiO thToUHsx+NxEAkWDkAEBRNvtI56T0+67kQPC60UtNBwZ5/6VSpnXngwZcK8e2QBRvBYx VxDQ== X-Gm-Message-State: AOJu0YzIlC1/S21KVt6oFPRsuRAMdS2Hs9NS+MoXu86GSx1AYVoNutvj EX002A7D3HB3U8QE/1ppBSNE29FG0nHBF8C9qVDPTHyOpwcTsM4JZ03AjrLL X-Gm-Gg: ASbGncsBE/Gltq2dzqnMs2em7Ia+0E1tdrcWSzXTD0P5szzhFRWXKR/taMehXemTfCI 1cmn3QAawbmqDT7IdgW0Yy/FP+nRGZcAK6GRR8W51Lhotbg/wXH/AUekKSsXjet48WzjnNvo23g WTA1p8fTB1caIdFl/q0WQVrii5FP0FLbFlJCWcCKWhlbCLXiK6w68BP5G4sJCtZ8NFon7W/Hw+V LLG5Av/CYinFT4UdOzwQb4FLuTwGLJNNzUn+kS49SaMgJ7fYGlrfSyJQZGilBcu3J4QZzR2aqHL lRNw X-Google-Smtp-Source: AGHT+IEWqoY3Z/GS5jT28v1ZITH5oiQAa3KOsRxm2HfFO/sPWIIu4MB4+zLtNITDMwAJ1a7vmfEy8A== X-Received: by 2002:a17:906:4fcc:b0:abb:de17:4a30 with SMTP id a640c23a62f3a-abbf384a4dcmr170869766b.19.1740050556600; Thu, 20 Feb 2025 03:22:36 -0800 (PST) Received: from localhost ([5.181.62.98]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abba7c63162sm647314466b.182.2025.02.20.03.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2025 03:22:36 -0800 (PST) X-Google-Original-From: Sergey Bronnikov To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , sergos@tarantool.org Date: Thu, 20 Feb 2025 14:21:50 +0300 Message-ID: <6990a0f3b661498e2c4c7697f5da4cfe4e35ffe4.1740050074.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 5/8][v3] test: introduce flag LUAJIT_DISABLE_MEMPROF 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" The patch introduce an environment variable LUAJIT_DISABLE_MEMPROF needed by tests in suite `tarantool-tests` for skip testcases when memprof is disabled in build. Needed for the following commit. --- test/tarantool-tests/CMakeLists.txt | 4 ++++ .../gh-5994-memprof-human-readable.test.lua | 1 + .../profilers/misclib-memprof-lapi.test.lua | 15 ++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index 9bacac88..a6d09dc7 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -97,6 +97,10 @@ if(LUAJIT_DISABLE_SYSPROF) list(APPEND LUA_TEST_ENV_MORE LUAJIT_DISABLE_SYSPROF=1) endif() +if(LUAJIT_DISABLE_MEMPROF) + list(APPEND LUA_TEST_ENV_MORE LUAJIT_DISABLE_MEMPROF=1) +endif() + # Needed to skip some long tests or tests using signals. # See also https://github.com/tarantool/tarantool/issues/10803. if(LUAJIT_USE_VALGRIND) diff --git a/test/tarantool-tests/profilers/gh-5994-memprof-human-readable.test.lua b/test/tarantool-tests/profilers/gh-5994-memprof-human-readable.test.lua index f3041779..3dc0db6b 100644 --- a/test/tarantool-tests/profilers/gh-5994-memprof-human-readable.test.lua +++ b/test/tarantool-tests/profilers/gh-5994-memprof-human-readable.test.lua @@ -7,6 +7,7 @@ local test = tap.test('gh-5994-memprof-human-readable'):skipcond({ ['No profile tools CLI option integration'] = _TARANTOOL, -- See also https://github.com/LuaJIT/LuaJIT/issues/606. ['Disabled due to LuaJIT/LuaJIT#606'] = os.getenv('LUAJIT_TABLE_BUMP'), + ['Memprof is disabled'] = os.getenv('LUAJIT_DISABLE_MEMPROF'), }) local utils = require('utils') diff --git a/test/tarantool-tests/profilers/misclib-memprof-lapi.test.lua b/test/tarantool-tests/profilers/misclib-memprof-lapi.test.lua index 077a7e44..cd675864 100644 --- a/test/tarantool-tests/profilers/misclib-memprof-lapi.test.lua +++ b/test/tarantool-tests/profilers/misclib-memprof-lapi.test.lua @@ -8,6 +8,7 @@ local test = tap.test("misclib-memprof-lapi"):skipcond({ jit.arch ~= "x64", -- See also https://github.com/LuaJIT/LuaJIT/issues/606. ["Disabled due to LuaJIT/LuaJIT#606"] = os.getenv("LUAJIT_TABLE_BUMP"), + ["Memprof is disabled"] = os.getenv("LUAJIT_DISABLE_MEMPROF"), }) test:plan(5) @@ -164,9 +165,9 @@ test:test("output", function(subtest) -- 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 = 39, linedefined = 37 }, 2)) + subtest:ok(check_alloc_report(alloc, { line = 40, linedefined = 38 }, 2)) -- 20 strings allocations. - subtest:ok(check_alloc_report(alloc, { line = 44, linedefined = 37 }, 20)) + subtest:ok(check_alloc_report(alloc, { line = 45, linedefined = 38 }, 20)) -- Collect all previous allocated objects. subtest:ok(free.INTERNAL == 22) @@ -174,8 +175,8 @@ test:test("output", function(subtest) -- Tests for leak-only option. -- See also https://github.com/tarantool/tarantool/issues/5812. local heap_delta = process.form_heap_delta(events) - local tab_alloc_stats = heap_delta[form_source_line(39)] - local str_alloc_stats = heap_delta[form_source_line(44)] + local tab_alloc_stats = heap_delta[form_source_line(40)] + local str_alloc_stats = heap_delta[form_source_line(45)] subtest:ok(tab_alloc_stats.nalloc == tab_alloc_stats.nfree) subtest:ok(tab_alloc_stats.dbytes == 0) subtest:ok(str_alloc_stats.nalloc == str_alloc_stats.nfree) @@ -260,10 +261,10 @@ test:test("jit-output", function(subtest) -- 10 allocations in interpreter mode, 1 allocation for a trace -- recording and assembling and next 9 allocations will happen -- while running the trace. - subtest:ok(check_alloc_report(alloc, { line = 44, linedefined = 37 }, 11)) - subtest:ok(check_alloc_report(alloc, { traceno = 1, line = 42 }, 9)) + subtest:ok(check_alloc_report(alloc, { line = 45, linedefined = 38 }, 11)) + subtest:ok(check_alloc_report(alloc, { traceno = 1, line = 43 }, 9)) -- See same checks with jit.off(). - subtest:ok(check_alloc_report(alloc, { line = 39, linedefined = 37 }, 2)) + subtest:ok(check_alloc_report(alloc, { line = 40, linedefined = 38 }, 2)) -- Restore default JIT settings. jit.opt.start(unpack(jit_opt_default)) -- 2.43.0