public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/27829] New: support for floating point values passed through sdt.h markers
@ 2021-05-07  2:06 fche at redhat dot com
  2021-10-19 18:43 ` [Bug translator/27829] " scox at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fche at redhat dot com @ 2021-05-07  2:06 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-19 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  2:06 [Bug translator/27829] New: support for floating point values passed through sdt.h markers fche at redhat dot com
2021-10-19 18:43 ` [Bug translator/27829] " scox at redhat dot com

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).