public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "fche at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/27829] New: support for floating point values passed through sdt.h markers
Date: Fri, 07 May 2021 02:06:15 +0000	[thread overview]
Message-ID: <bug-27829-6586@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27829

            Bug ID: 27829
           Summary: support for floating point values passed through sdt.h
                    markers
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: fche at redhat dot com
  Target Milestone: ---

Created attachment 13422
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13422&action=edit
partial patch

While stap has recently developed the ability access floating point parameters
passed through dwarf-designated locations, we can't do that for sdt.h.  That's
for a couple of reasons: 

- tapsets.cxx sdt_uprobe_var_expanding_visitor::build_dwarf_registers does not
recognize FP register names
- includes/sys/sdt.h uses an STAP_SDT_ARG_CONSTRAINT that excludes FP registers
(so FP values are copied into integer registers anyway)
- includes/sys/sdt.h has no way of marking up floating-point vs integer
registers

A partial patch for the first two parts is attached, for x86-64.
The latter requires some coordination with other sdt.h consumers, in order to
parse a modification of the operand description syntax.  One possibility:

Instead of:

% readelf -n stap
stapsdt              0x0000003b       NT_STAPSDT (SystemTap probe descriptors)
[...]
    Arguments: 8@%xmm0 4@%xmm1

use:

stapsdt              0x0000003b       NT_STAPSDT (SystemTap probe descriptors)
[...]
    Arguments: 8f@%xmm0 4f@%xmm1

i.e., insert an "f" char between the length and the "@" sign.  We could/should
do that even if the floats were copied into an integer register due to operand
constraints.

-- 
You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2021-05-07  2:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  2:06 fche at redhat dot com [this message]
2021-10-19 18:43 ` [Bug translator/27829] " scox at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27829-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).