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 22908560EB2; Mon, 31 Jul 2023 23:30:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 22908560EB2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1690835414; bh=tXDSqZqlLH9OBs7EQv4oJMR1bH6eiBPT4XC1CkJkfJM=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=YC6zCV+ONMy+ALbRxC+dKa/CUqfAbOoMuv8NBbVtnRiXU2dVU0GKKBLV5syzsA9Js sqWnrgEXM+4Na4VgGjPHJcCFEhrKALUXD22S2sUnMu8YCfDF0fgJVKnGCi2sKUUSSu DZp1YcP0Dc/VTgS4fhyEHiJWe8mfNEdumxnkCsu0= Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 93E5455BD6E for ; Mon, 31 Jul 2023 23:30:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 93E5455BD6E Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-4fe07f0636bso7977273e87.1 for ; Mon, 31 Jul 2023 13:30:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690835410; x=1691440210; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LX8Wz/QoTq8ifFjKDJ9peZzGB6yxdnLllXYRU7KQmGI=; b=b+uR1VJTSmblngbYhVGgU80OR4ZFWTGTq8VDBQ+jxiYmz+6okawHPB4eoE26eezry5 S7VkrWLr8KYUX9/Zi9xKaI24J84rWF7SQ+g4DfH+duyBwbIF18Co2FAFfiSBivy4MS7z 8WgpkGk5ZJs0NQEO7iBn1X5xtNRMSwFex7OONloUtNWLoehKQbTvir0NcnhQuVdR4ibX epAhJawV6RQvu2PIiQQ9SsH91fiBUmQkwCS+psw5h15IUhinIDwicMqmOYY6gvWT0GA5 NsN7hMb+ebN+v+8GAJU4n+Nn5alEfC7tNUjB5XHH4xZecGlOjo/MpaniX7X0TUMy7OuN uhJg== X-Gm-Message-State: ABy/qLbs02hDID/7ZqFHd4byKtuVlmCro4jsr/DRCM5Dkp8k1gDNOX4R 7VB6I43FYvXnlVBs6Ef/3YC/ZEJSI3V/CA== X-Google-Smtp-Source: APBJJlEO32/NJ7BO6jg8Y9p1BtIqV1DoLaGRPCikppu/rUOWrmh1zNcd7TF+WFSDAsEapyLuKJIEWg== X-Received: by 2002:ac2:5f66:0:b0:4fa:ad2d:6c58 with SMTP id c6-20020ac25f66000000b004faad2d6c58mr559172lfc.61.1690835410242; Mon, 31 Jul 2023 13:30:10 -0700 (PDT) Received: from localhost.localdomain (95-24-1-220.broadband.corbina.ru. [95.24.1.220]) by smtp.gmail.com with ESMTPSA id r25-20020ac24d19000000b004fe1f1c0ee4sm1814906lfi.82.2023.07.31.13.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 13:30:09 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, skaplun@tarantool.org, imun@tarantool.org Date: Mon, 31 Jul 2023 23:30:02 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v3 0/4] sysprof: parser refactoring 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" This patchset is targeted at reducing the memory footprint of the sysprof parser. It is mainly achieved by fixing a nasty bug in the AVL tree implementation, which caused most of the memory consumption, and by essentially purging the collapse.lua module, which means that there is no need to store the complete information about every parsed event and it is sufficient to merge stacks inplace. Alongside with described changes two minor improvements were done: - `luajit-parse-sysprof` now has permissions to be executed - `split_by_vmstate` option is purged, because no one uses it, so there is no actual reason to maintain it. ## Note for Igor: There is no way to split the 'memory footprint reduction'-part and the 'collapse.lua purge'-part, since the main reason why memory consumption is so much lower now, other the AVL-tree bug, is that we don't need to pass a complete profile information between the `parse.lua` and `collapse.lua`. That, basically, almost turns the profile parsing process into some kind of stream-based procedure. PR: https://github.com/tarantool/tarantool/pull/8703 Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-8700-sysprof-parser-refactoring Maxim Kokryashkin (4): utils: remove unnecessary insertion in AVL-tree sysprof: remove `split by vmstate` option tools: add execution permission to sysprof parser sysprof: improve parser's memory footprint .../gh-5813-resolving-of-c-symbols.test.lua | 6 +- tools/CMakeLists.txt | 4 + tools/luajit-parse-sysprof.in | 0 tools/sysprof.lua | 28 +--- tools/sysprof/collapse.lua | 127 +----------------- tools/sysprof/parse.lua | 126 ++++++++++++----- tools/utils/avl.lua | 4 +- tools/utils/symtab.lua | 2 +- 8 files changed, 106 insertions(+), 191 deletions(-) mode change 100644 => 100755 tools/luajit-parse-sysprof.in -- 2.41.0