From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id BB4013857C4D for ; Thu, 23 Jul 2020 05:16:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BB4013857C4D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=2ndquadrant.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=craig.ringer@2ndquadrant.com Received: by mail-lj1-x232.google.com with SMTP id z24so4956728ljn.8 for ; Wed, 22 Jul 2020 22:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=92gL3X9PDIXGFrOEjUg7qbICymbj6Dp/co63Y/P61PQ=; b=Gza8kPF0/KoEF6pTepaVVf4nv6ecVY9bwVKmKKcmdDXoRrQy0vx6MH4dnixkm9dNtb Z6I++VoTaM1TzSi8taE7LTZlPvcwd44Ml74ElvyARU+PnCRAuu3MWzjVWA3TEqoKXeX2 nmQe+256pdUeeI0qZ8CwfQimvHc/u7CEtonn5HoZf6SUYZT/wL+PcOuiY9LyLxEXV3Sb jBqcR3u6QbafM9HVSvYBvqke3n2eH2LE7/jiStURBt7p3LGCHYLHWVdHNdLUPYTzDdYj LBV+t4irvdHZvI4Bb3IjYtoe47QL0b+bnjbuX4/yLc+NisXQINyk4gI8yZZ/SM/k7zAn pzQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=92gL3X9PDIXGFrOEjUg7qbICymbj6Dp/co63Y/P61PQ=; b=s5EVEVdPr9YwfnexjrmayhqivDZtUt+TsvyBldAZOkpYPGD3rcQfdLBG7k9luy1GeE gWFCxpbJ7eyjMlEUAPOL0euwcwQFxDPh66fG6v4IEALhU+2DY9qR7x8wXipDowyWx6uk /5NM1UJk5mrjn1Q8oiR133to2lAgOAfLB0vCvqN+q19MCkoyVHmgSdu7cY2PkisM6c2Z 8/8FmeyTWx8rtXWSN2p1EUigjKhajgldei4zFATObyQpTc2e9CMIzPGj6ci+X7S6pIps wgovS57XBa6BYB1hEg9SyeXQfZ1bHkPDcDvHtJobzgFMyy07/sVFTTW/jcPS56dub90e dFfg== X-Gm-Message-State: AOAM531e4RU/D+dQqZ1zlIUGYzKkRTagkkh1qMLli4L063kq8KOvIIpc tBf5/nr3kgcDEqQHkH5bq58DcblURa6RAi+Epydm3oO3wKE= X-Google-Smtp-Source: ABdhPJz9jOKms04qjyezEz2I8Oc/OIFwPigUHhUpD/oWcg97yk5NRQHb7pnKQrTopGyBZy7/njBmDIWqjK366DCZDJA= X-Received: by 2002:a2e:9a05:: with SMTP id o5mr1255007lji.63.1595481384124; Wed, 22 Jul 2020 22:16:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Craig Ringer Date: Thu, 23 Jul 2020 13:16:12 +0800 Message-ID: Subject: Re: Code maintenance / verbosity: macros, enums, and casts To: systemtap@sourceware.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2020 05:16:27 -0000 Replying-to-self with some notes/progress on this. While I'm at it, having started to read more of the systemtap code properly, it's an absolutely miraculous tool in terms of how easily the complexity it deals with is hidden from the user. Truly incredible, thankyou! TL;DR: WIP patch at https://github.com/ringerc/systemtap-patches . Some compile issues remain, so it's not even a PoC yet, but I think I've figured out how it all has to work. It didn't help that libdw itself, is not exactly ... documented. For anyone else looking for documention on libdw, elfutils etc, this is one of the few sources I found: https://developer.ibm.com/technologies/systems/articles/au-dwarf-debug-format/ (Now that I think I worked much of it out, at some stage I hope I'll be able to come and add a few comments in relevant places to help explain what the various visitors do, how the dwarf_query stuff works and which ones relate to which stap code constructs, etc.) -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise