From: Mark Wielaard <mjw@redhat.com>
To: Stan Cox <scox@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Subject: Re: mysql static probes demo
Date: Mon, 26 Jan 2009 20:03:00 -0000 [thread overview]
Message-ID: <1232969109.7635.30.camel@localhost.localdomain> (raw)
In-Reply-To: <1232742551.1739.64.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
Hi Stan,
On Fri, 2009-01-23 at 15:29 -0500, Stan Cox wrote:
> Here is a demo of mysql being probed.
Wow, that is a really great demo!
What mysql source did you take and how did you configure/build it?
I did have some troubles with the new python wrapper to get postgres to
compile. I believe you should handle the creating of the output filename
differently when there has been no -o option given (and not add
extensions when it is given). I am attaching my local change.
Still trying to figure out how to actually enable the postgres probes
with the new runtime support though. All I am getting is:
pattern '/usr/bin/postgres' matches module '/usr/bin/postgres'
focused on module '/usr/bin/postgres = [0x8047000-0x841bb60,
bias 0x0] file /usr/lib/debug/usr/bin/postgres.debug ELF machine
i?86 (code 3)
focused on module '/usr/bin/postgres'
semantic error: no match while resolving probe point
process("/usr/bin/postgres").statement(1869379436)
dwarf_builder releasing user dwflpp /usr/bin/postgres
semantic error: no probes found
Need to look into why.
Cheers,
Mark
[-- Attachment #2: dtrace.diff --]
[-- Type: text/x-patch, Size: 1277 bytes --]
diff --git a/dtrace b/dtrace
index 1eb53bf..fdf9da1 100755
--- a/dtrace
+++ b/dtrace
@@ -21,7 +21,7 @@ class provider:
have_provider = False
self.f = open(provider)
self.h = open(header,mode='w')
- self.h.write("// Generated by /usr/bin/dtrace\n")
+ self.h.write("// Generated by the Systemtap dtrace wrapper\n")
self.h.write("\n#include <sys/sdt.h>\n\n")
in_comment = False
while (True):
@@ -125,21 +125,21 @@ if (build_header == False and build_source == False):
if (filename == ""):
if (s_filename != ""):
filename = s_filename.replace(".d","")
+ if (build_header):
+ filename = filename + ".h"
+ elif (build_source):
+ filename = filename + ".o"
else:
usage
sys.exit(1)
if (build_header):
providers = provider()
- providers.open(s_filename, filename + ".h")
+ providers.open(s_filename, filename)
elif (build_source):
fn = "/tmp/" + os.path.basename(s_filename).replace(".d", ".c")
f = open(fn,mode='w')
f.write("static __dtrace () {}\n")
f.close()
- call("gcc -fPIC -c " + fn + " -o " + filename + ".o", shell=True)
- f.close()
+ call("gcc -fPIC -c " + fn + " -o " + filename, shell=True)
os.remove(fn)
-
-
-
next prev parent reply other threads:[~2009-01-26 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 22:19 Stan Cox
2009-01-26 20:03 ` Mark Wielaard [this message]
2009-01-27 1:21 ` Stan Cox
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=1232969109.7635.30.camel@localhost.localdomain \
--to=mjw@redhat.com \
--cc=scox@redhat.com \
--cc=systemtap@sources.redhat.com \
/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).