summaryrefslogtreecommitdiffstats
path: root/src/systemtap
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-02-29 13:20:28 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2016-06-10 18:15:27 +0200
commit6dcbfe52d5e64205c0d922f3e89add066b42c496 (patch)
tree17ccc47e89ac2733ee62062c6fbeb8af50179463 /src/systemtap
parentbd93ef2db6d24946ebf98a23fa18d34d45f6b072 (diff)
downloadsssd-6dcbfe52d5e64205c0d922f3e89add066b42c496.tar.gz
sssd-6dcbfe52d5e64205c0d922f3e89add066b42c496.tar.xz
sssd-6dcbfe52d5e64205c0d922f3e89add066b42c496.zip
SYSDB: Add systemtap probes to track sysdb transactions
Actually adds marks for sysdb transactions that receive the transaction nesting level as an argument. The nesting is passed on from probes to marks along with a human-friendly description. The transaction commit is decorated with two probes, before and after. This would allow the caller to distinguish between the time we spend in the transaction (which might be important, because if a transaction is active on an ldb context, even the readers are blocked before the transaction completes) and the time we spend commiting the transaction (which is important because that's when the disk writes occur) The probes would be installed into /usr/share/systemtap/tapset on RHEL and Fedora. This is in line with systemtap's paths which are described in detail in "man 7 stappaths". Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/systemtap')
-rw-r--r--src/systemtap/sssd.stp.in32
-rw-r--r--src/systemtap/sssd_probes.d4
2 files changed, 36 insertions, 0 deletions
diff --git a/src/systemtap/sssd.stp.in b/src/systemtap/sssd.stp.in
new file mode 100644
index 000000000..2bd45aeb8
--- /dev/null
+++ b/src/systemtap/sssd.stp.in
@@ -0,0 +1,32 @@
+# Database transaction probes
+probe sssd_transaction_start = process("@libdir@/sssd/libsss_util.so").mark("sysdb_transaction_start")
+{
+ nesting = $arg1;
+ probestr = sprintf("-> %s(nesting=%d)",
+ $$name,
+ nesting);
+}
+
+probe sssd_transaction_commit_before = process("@libdir@/sssd/libsss_util.so").mark("sysdb_transaction_commit_before")
+{
+ nesting = $arg1;
+ probestr = sprintf("<- %s(pre)(nesting=%d)",
+ $$name,
+ nesting);
+}
+
+probe sssd_transaction_commit_after = process("@libdir@/sssd/libsss_util.so").mark("sysdb_transaction_commit_after")
+{
+ nesting = $arg1;
+ probestr = sprintf("<- %s(post)(nesting=%d)",
+ $$name,
+ nesting);
+}
+
+probe sssd_transaction_cancel = process("@libdir@/sssd/libsss_util.so").mark("sysdb_transaction_cancel")
+{
+ nesting = $arg1;
+ probestr = sprintf("<- %s(nesting=%d)",
+ $$name,
+ nesting);
+}
diff --git a/src/systemtap/sssd_probes.d b/src/systemtap/sssd_probes.d
index 7579577c8..f4890ddfd 100644
--- a/src/systemtap/sssd_probes.d
+++ b/src/systemtap/sssd_probes.d
@@ -1,2 +1,6 @@
provider sssd {
+ probe sysdb_transaction_start(int nesting);
+ probe sysdb_transaction_commit_before(int nesting);
+ probe sysdb_transaction_commit_after(int nesting);
+ probe sysdb_transaction_cancel(int nesting);
}