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 C31326ECC0; Wed, 6 Apr 2022 15:49:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C31326ECC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1649249386; bh=4IiVRpEPeyTS47ZCGCkMqG4/bEsDtvaFbY4eH1n2tf4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lPQF5Clf9esyCVDct2adl8S6CK0cpPVBYzvO4VqVxhpqWbcQ5TBTa48cyQU67kchI T1+dPkgPe4i6eZOxkrBSIlFJAjoF6i6YJdV/OKSMhvEbodsQygY3GzRmdrwDhs5PaX zFaKTzG3H+R0BJKThkJmgEUdFhcuAhBo3utOyIkc= Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 8050A6ECC0 for ; Wed, 6 Apr 2022 15:49:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8050A6ECC0 Received: by mail-lf1-f51.google.com with SMTP id p15so3888897lfk.8 for ; Wed, 06 Apr 2022 05:49:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sPBec2UcM/LBlye5/JbQChAWYcT1K1B5jUL061crBWE=; b=BMNe9scnIF0YTYhFde2hc31D2AXzEeFOggfj6PSJiBI9ihJbtmEXWm6I8x6Lof8qsP +g4gGA5Jigr8uVhwaeuV9K6aTPXgsPyl+9/CbWQlSHZFkTOyV3CNXpL+VDEyKq9xcsrs Mvai1PGAXYvFzoTZ4Vy+Grn7vQidjiLtd2AllmzsOZvWf07RzM6wqbRnNkMluTZpNYTq 3tvnKv54USgBX2TgGbx190nD+pGU06WPymyzhh1sROTJC1D6H47/KclFAI7mtpFyq+Ib FryreZqvB5ZTTNpRmJ8DSl03d8Z9SLjJAgD1vO/z1Dl7aXqFKvZuqiqogWGsTjs1iQAR CfOw== X-Gm-Message-State: AOAM531Oq7Pv6W1lalFOUlgpadyBjt/6EpnObqs+UD2Upq7jl0HasuC4 K8JEQ90dMhGFRrJOm6D3+cQRdBDQRpuLEQ== X-Google-Smtp-Source: ABdhPJyU/9oI5qgmu3xXBYQcbOjVxi2R6sKBlzJBWSl1lkmhf51WBIrBqufOYylAGiWtWlYUz8nAUg== X-Received: by 2002:a05:6512:3050:b0:44b:111:be72 with SMTP id b16-20020a056512305000b0044b0111be72mr6009842lfb.138.1649249383987; Wed, 06 Apr 2022 05:49:43 -0700 (PDT) Received: from localhost.localdomain ([93.175.28.20]) by smtp.gmail.com with ESMTPSA id i25-20020a0565123e1900b0044a2908b040sm1821375lfv.115.2022.04.06.05.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:49:43 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Wed, 6 Apr 2022 15:49:32 +0300 Message-Id: X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v3 0/7] introuduce platform profiler 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Changes in v3: - Fixed comments as per review by Sergey - Rebased onto new master Maxim Kokryashkin (4): memprof: move symtab to a separate module memprof: add profile common section sysprof: introduce Lua API tools: introduce parsers for sysprof Mikhail Shishatskiy (3): vm: save topframe info into global_State core: separate the profiling timer from lj_profile core: introduce lua and platform profiler .gitignore | 1 + CMakeLists.txt | 6 + src/CMakeLists.txt | 3 + src/Makefile.dep.original | 47 +- src/lib_misc.c | 268 +++++++++- src/lj_arch.h | 11 + src/lj_errmsg.h | 2 +- src/lj_mapi.c | 26 + src/lj_memprof.c | 82 +-- src/lj_memprof.h | 41 -- src/lj_obj.h | 12 + src/lj_profile.c | 176 +------ src/lj_profile_timer.c | 133 +++++ src/lj_profile_timer.h | 83 +++ src/lj_state.c | 7 + src/lj_symtab.c | 84 +++ src/lj_symtab.h | 65 +++ src/lj_sysprof.c | 483 ++++++++++++++++++ src/lj_sysprof.h | 94 ++++ src/ljamalg.c | 2 + src/lmisclib.h | 93 ++++ src/vm_x64.dasc | 52 +- src/vm_x86.dasc | 52 +- test/tarantool-tests/CMakeLists.txt | 1 + .../misclib-sysprof-capi.test.lua | 53 ++ .../misclib-sysprof-capi/CMakeLists.txt | 1 + .../misclib-sysprof-capi/testsysprof.c | 269 ++++++++++ .../misclib-sysprof-lapi.test.lua | 120 +++++ tools/CMakeLists.txt | 83 +++ tools/luajit-parse-sysprof.in | 6 + tools/sysprof.lua | 119 +++++ tools/sysprof/collapse.lua | 113 ++++ tools/sysprof/parse.lua | 188 +++++++ tools/utils/symtab.lua | 2 +- 34 files changed, 2430 insertions(+), 348 deletions(-) create mode 100644 src/lj_profile_timer.c create mode 100644 src/lj_profile_timer.h create mode 100644 src/lj_symtab.c create mode 100644 src/lj_symtab.h create mode 100644 src/lj_sysprof.c create mode 100644 src/lj_sysprof.h create mode 100644 test/tarantool-tests/misclib-sysprof-capi.test.lua create mode 100644 test/tarantool-tests/misclib-sysprof-capi/CMakeLists.txt create mode 100644 test/tarantool-tests/misclib-sysprof-capi/testsysprof.c create mode 100644 test/tarantool-tests/misclib-sysprof-lapi.test.lua create mode 100644 tools/luajit-parse-sysprof.in create mode 100644 tools/sysprof.lua create mode 100755 tools/sysprof/collapse.lua create mode 100755 tools/sysprof/parse.lua -- 2.35.1