From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id E282F383541B for ; Fri, 15 Jan 2021 02:01:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E282F383541B 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-lf1-x12f.google.com with SMTP id 23so10909897lfg.10 for ; Thu, 14 Jan 2021 18:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:cc; bh=NRB3kYcJx958hJnbeyQv2uUGld6Z3Y+44QUlQHpHdyI=; b=Vt55akTK2YIzuPt/BczwBKwa7OV+XJmfLILQe2X7QneYQybMqBa6ceIGan7xE2sH0U e2UU6WRxvpxu7nUzgev2wDWGM8hG3dFljn/iAU3jdrjC6vq6pFi5pZs9wrxU9nsNdaHU 27TmQqckhAtsSuO9TZhNblZpAoTMwzNeLO1JOg20hODtMPc5mdSVtD8gBj4t8ElKCgeI w2RmZHaoPDx1/Ik2o56OHNz+5d+fP+8t6rgydwlp6VZS/KYxTWX1rIJM8UlxtABzilXZ ElR8kTYjQ4cbOGLJvoJb87Gq3y7onAB9PKSO7apJfI5RuJvt1d16Xz2adueur85wb/qk zhVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=NRB3kYcJx958hJnbeyQv2uUGld6Z3Y+44QUlQHpHdyI=; b=fqxpTBoyFTGxQRb5WSl4a/bxf4OYUZM+QNWMjAdMaVtvJh+a/hVDBkDAUdxWMzhpf4 NEnMd3r3dd7e3isj0M11BEwTFuXW9iEdaoCDhKMd3mLmsqrFGhETFP/wWIruZrCNinnE hK5so0+kSazpMGfMHWzoCyqSKYP+rbYn6z9bd4UeWjgZ/egBJqoPNgkqtGf6ibJjk2ac PV2u1k8T89jBhAlibXFGzcUPUmeAAGBK36Qax3WoHhg7c4KCQMruUnid9Z3GzmbOS4WX f8G/BbzHDbBweFqd7m0mqludRZV3DRQIW/3tPTgYCbgDqAVA4WnjNJMAx10XYz0EzedJ 0gNg== X-Gm-Message-State: AOAM530d7TUrfzIXooIUcIFQgFbYXa9G1YsWG5YO8uquxhp3YLGTjEa0 MvU2ukXKXlfPk5XWEt+WbD0IDVRPrn1rXXnmmHmDMXipQqpo5aEq X-Google-Smtp-Source: ABdhPJy+xBlZvgmYvEw8/HWL4A93ZFOHsNh2DrJQhXKyPaV2ovrQK1Sj3zthvxKeTbkXKlOub993MORPQRDOozdiiFU= X-Received: by 2002:a05:6512:3305:: with SMTP id k5mr4416753lfe.35.1610676097522; Thu, 14 Jan 2021 18:01:37 -0800 (PST) MIME-Version: 1.0 From: Craig Ringer Date: Fri, 15 Jan 2021 10:01:26 +0800 Message-ID: Subject: [PATCH] Capture user buffers with user_buffer_hex To: systemtap@sourceware.org Cc: "Frank Ch. Eigler" X-Spam-Status: No, score=-2.1 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: Fri, 15 Jan 2021 02:01:40 -0000 Hi The set of patches listed below adds new functions user_buffer_hex and buffer_hex for the uconversions and conversions tapsets respectively. A few helper variants are added too. These functions allow systemtap scripts to capture and output easily parsed userspace data in hexadecimal format. I'd like to add another helper that prints the buffer, with an optional prefix, without releasing the lock on the output stream so it can't get interleaved with other output from concurrent probes. But I got a bit bogged doing that so I'll see about submitting a separate patch for it. To apply it you'll need to first apply another patch that reworks the tests a little. Prereq: https://sourceware.org/bugzilla/show_bug.cgi?id=27185 Patch: https://sourceware.org/bugzilla/show_bug.cgi?id=27187 I also wrote a small unrelated docs patch to cover the CONTEXT var for embedded C, here: https://sourceware.org/bugzilla/show_bug.cgi?id=27186 -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise