public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/27187] New: Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets
@ 2021-01-15  1:59 craig.ringer at 2ndquadrant dot com
  2021-01-15  1:59 ` [Bug tapsets/27187] " craig.ringer at 2ndquadrant dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-15  1:59 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 27187
           Summary: Introduce user_buffer_hex and kernel_buffer_hex
                    helpers in conversions tapsets
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: craig.ringer at 2ndquadrant dot com
  Target Milestone: ---

Created attachment 13120
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13120&action=edit
Patch to add user_buffer_hex() and kernel_buffer_hex() tapset functions

This patch adds new user_buffer_hex() and kernel_buffer_hex() functions to the
uconversions.stp and linux/conversions.stp tapsets, plus an underlying support
function in runtime/stp_string.c

These functions work a bit like user_buffer_quoted() and kernel_buffer_quoted()
but they do simple hex escaping with predictable sized output and faster
processing.

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

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

* [Bug tapsets/27187] Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets
  2021-01-15  1:59 [Bug tapsets/27187] New: Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets craig.ringer at 2ndquadrant dot com
@ 2021-01-15  1:59 ` craig.ringer at 2ndquadrant dot com
  2021-01-15 21:46 ` fche at redhat dot com
  2021-01-18  3:59 ` craig.ringer at 2ndquadrant dot com
  2 siblings, 0 replies; 4+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-15  1:59 UTC (permalink / raw)
  To: systemtap

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

Craig Ringer <craig.ringer at 2ndquadrant dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

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

* [Bug tapsets/27187] Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets
  2021-01-15  1:59 [Bug tapsets/27187] New: Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets craig.ringer at 2ndquadrant dot com
  2021-01-15  1:59 ` [Bug tapsets/27187] " craig.ringer at 2ndquadrant dot com
@ 2021-01-15 21:46 ` fche at redhat dot com
  2021-01-18  3:59 ` craig.ringer at 2ndquadrant dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2021-01-15 21:46 UTC (permalink / raw)
  To: systemtap

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Is this about the same as

     printf("%.*M", length, address)   // kernelspace
and  printf("%.*#M", length, address)  // userspace

?

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

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

* [Bug tapsets/27187] Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets
  2021-01-15  1:59 [Bug tapsets/27187] New: Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets craig.ringer at 2ndquadrant dot com
  2021-01-15  1:59 ` [Bug tapsets/27187] " craig.ringer at 2ndquadrant dot com
  2021-01-15 21:46 ` fche at redhat dot com
@ 2021-01-18  3:59 ` craig.ringer at 2ndquadrant dot com
  2 siblings, 0 replies; 4+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-18  3:59 UTC (permalink / raw)
  To: systemtap

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

--- Comment #2 from Craig Ringer <craig.ringer at 2ndquadrant dot com> ---
Created attachment 13131
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13131&action=edit
Docs x-ref for %.*M etc

Well, now I feel really, really dumb. Oh well, I learned some useful things.

Replacement patch attached that points this out in the docs for
user_buffer_quoted() and user_string().

I took a quick look to see if I could work out how to create a function::printf
and function::sprintf manpage to x-ref the stap(1) content, but didn't work out
a way to do so without injecting a tapset function for printf and sprintf.

I guess I could put them in a dummy tapset with no actual definitions or wedge
them into uconversions.stp, but neither seems very pretty.

Anyway, docs patch attached. I'll confirm whether it can fully replace my use
of user_buffer_hex.

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

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

end of thread, other threads:[~2021-01-18  3:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15  1:59 [Bug tapsets/27187] New: Introduce user_buffer_hex and kernel_buffer_hex helpers in conversions tapsets craig.ringer at 2ndquadrant dot com
2021-01-15  1:59 ` [Bug tapsets/27187] " craig.ringer at 2ndquadrant dot com
2021-01-15 21:46 ` fche at redhat dot com
2021-01-18  3:59 ` craig.ringer at 2ndquadrant 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).