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 2F2776EFDA; Wed, 11 May 2022 11:26:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2F2776EFDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1652257617; bh=YpHW+ojxEcTCEazAADq67Jx3znMWn4FDZlMzbOGGR00=; 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=O+Die7joel8f/6u+jZAhY6CXHP/WVaEW8pbegHQE2cPPA9F8KZsjfHMhaxSwIdXJQ VNdacZ/gZbvKtzEAkiFNswyrW/iexEhdSb2ZLs4TIu2pNIg1nFT5rkNGygHPIHRKCW RtpEGmtHon0MkuZoWk5isCmoUyuV9XQGYDJ7n8JU= Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 DAFCB6F862 for ; Wed, 11 May 2022 11:25:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DAFCB6F862 Received: by mail-lj1-f174.google.com with SMTP id m23so1667498ljc.0 for ; Wed, 11 May 2022 01:25:29 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ew48h4qQHLMjWnzlu7rftfBXUoUGC7mtK2Poo7pmUks=; b=6ZFKxIdY2rXGXveUtYawcsiCQPjhWNraWrv2w7TwK5e9g9ZmTmFT7L4YMtiBFPr/hy mIkv+EoniY8kizQWfJVSB1zoDX/X39/jCXSxv8PPeswlzLmQ3oS3YgkNTF7FzcFfhY7N 0ytD2nyb3tcZnnXf2MUK+UtPkvbiOIkyrlqklkboO9HWmb4C7+3/O0pQA2kqnPO2nIY/ oUO/qudAYiCyv4w2KqZefd3dJeFNQVh+SH6g5cEnjQYz/GKZTkgrJyWz9yW6fX+vsboQ pAKQwNeziC2Af/jKEPk+cBZBmjR/juGfBgixKomnL6OLKt+AJ6VYsug/Kd2wkXW+ec/8 runA== X-Gm-Message-State: AOAM533JiEQdbGx1K4eqwVncuMvXRONJlgngsSXr4lH8zEb2xprGRCWm xVN9tewOjm+im4dUpwQzOC1h9MkimtnABQ== X-Google-Smtp-Source: ABdhPJxfSM5aBKoDvG1gay2sFVuLHX1nCqk8EgQ+KtxK4HuBUoq05/Tne4x/462Jbyyk8hB/8hRp0w== X-Received: by 2002:a2e:b8c3:0:b0:250:6889:6782 with SMTP id s3-20020a2eb8c3000000b0025068896782mr16104304ljp.531.1652257529145; Wed, 11 May 2022 01:25:29 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id 20-20020ac25f54000000b0047255d21167sm174724lfz.150.2022.05.11.01.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 01:25:28 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Wed, 11 May 2022 11:25:20 +0300 Message-Id: <20220511082521.389687-4-m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220511082521.389687-1-m.kokryashkin@tarantool.org> References: <20220511082521.389687-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] sysprof: fix `SYSPROF_HANDLER_STACK_DEPTH` 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 commit fixes the `SYSPROF_HANDLER_STACK_DEPTH`, by chnaging it to 6. The `writer` function is called right after `backtrace`, so it will not appear in the gathered backtrace. Part of tarantool/tarantool#781 --- Branch: https://github.com/tarantool/luajit/tree/fckxorg/sysprof-rc-full-ci src/lj_sysprof.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lj_sysprof.c b/src/lj_sysprof.c index 3088036f..55cea203 100644 --- a/src/lj_sysprof.c +++ b/src/lj_sysprof.c @@ -32,22 +32,20 @@ ** Number of profiler frames we need to omit during stack ** unwinding. ** +------------------------+ -** 0 | stream_frame_host | +** 0 | default_backtrace_host | ** +------------------------+ -** 1 | default_backtrace_host | +** 1 | stream_backtrace_host | ** +------------------------+ -** 2 | stream_backtrace_host | +** 2 | stream_{guest/host} | ** +------------------------+ -** 3 | stream_{guest/host} | +** 3 | stream_event | ** +------------------------+ -** 4 | stream_event | +** 4 | sysprof_record_sample | ** +------------------------+ -** 5 | sysprof_record_sample | -** +------------------------+ -** 6 | sysprof_signal_handler | +** 5 | sysprof_signal_handler | ** +------------------------+ */ -#define SYSPROF_HANDLER_STACK_DEPTH 7 +#define SYSPROF_HANDLER_STACK_DEPTH 6 #define SYSPROF_BACKTRACE_FRAME_MAX 512 /* Check that vmstate fits in 4 bits (see streaming format) */ -- 2.35.1