public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/13037] New: blacklist false positives
@ 2011-07-28  1:51 fche at redhat dot com
  2011-07-28  8:01 ` [Bug translator/13037] " mjw at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fche at redhat dot com @ 2011-07-28  1:51 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13037

           Summary: blacklist false positives
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: fche@redhat.com


Until bug #6711 is implemented, and we're stuck with the
built-in blacklist, we need to tweak it a tad.  Here is
one regexp that needs to be tightened up, to limit itself
to genuine lock- rather than block-related functions.

 blfn += "|.*read_.*lock.*";

from https://bugzilla.redhat.com/show_bug.cgi?id=708255#c5

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/13037] blacklist false positives
  2011-07-28  1:51 [Bug translator/13037] New: blacklist false positives fche at redhat dot com
@ 2011-07-28  8:01 ` mjw at redhat dot com
  2011-07-28 12:09 ` mjw at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mjw at redhat dot com @ 2011-07-28  8:01 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13037

Mark Wielaard <mjw at redhat dot com> changed:

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

--- Comment #1 from Mark Wielaard <mjw at redhat dot com> 2011-07-28 08:00:31 UTC ---
First try:

diff --git a/dwflpp.cxx b/dwflpp.cxx
index fda6afd..256b403 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -2986,7 +2986,9 @@ dwflpp::build_blacklist()

   // Lots of locks
   blfn += "|.*raw_.*lock.*";
-  blfn += "|.*read_.*lock.*";
+  blfn += "|.*read_lock.*";
+  blfn += "|.*read_unlock.*";
+  blfn += "|.*read_trylock.*";
   blfn += "|.*write_.*lock.*";
   blfn += "|.*spin_.*lock.*";
   blfn += "|.*rwlock_.*lock.*";

Which frees up the following (block and clock) functions for probing:

-ata_tf_read_block
-cdrom_read_block
-ext4_read_block_bitmap
-ext4_should_dioread_nolock
-pvclock_read_wallclock
-read_block_bitmap
-read_boot_clock
-read_persistent_clock
-read_tag_block
-sd_read_block_characteristics
-sd_read_block_limits
-thread_cpu_clock_get
-thread_cpu_clock_getres
-will_read_block

Still investigating the other [cb]lock related regexs.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/13037] blacklist false positives
  2011-07-28  1:51 [Bug translator/13037] New: blacklist false positives fche at redhat dot com
  2011-07-28  8:01 ` [Bug translator/13037] " mjw at redhat dot com
@ 2011-07-28 12:09 ` mjw at redhat dot com
  2016-05-26 17:56 ` fche at redhat dot com
  2021-03-21 15:43 ` tiberiuzbirnea at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mjw at redhat dot com @ 2011-07-28 12:09 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13037

--- Comment #2 from Mark Wielaard <mjw at redhat dot com> 2011-07-28 12:08:46 UTC ---
This is what I ended up with. Tested against 2.6.35.13-92.fc14.x86_64,
2.6.18-274.el5 and 2.6.32-131.6.1.el6.x86_64.

commit 65d791538e9c4c52f6fe121f740d8b1e01d27033
Author: Mark Wielaard <mjw@redhat.com>
Date:   Thu Jul 28 14:02:09 2011 +0200

    PR13037 Make lock blacklist more specific.

    The dwflpp::build_blacklist() would also match things like _nolock,
    block or clock. Be more specific that we want to only match things
    like _lock, _unlock, _trylock or seq[un]lock.

diff --git a/dwflpp.cxx b/dwflpp.cxx
index fda6afd..1a904f1 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -2985,15 +2985,24 @@ dwflpp::build_blacklist()
   blfn += "|unknown_nmi_error";

   // Lots of locks
-  blfn += "|.*raw_.*lock.*";
-  blfn += "|.*read_.*lock.*";
-  blfn += "|.*write_.*lock.*";
-  blfn += "|.*spin_.*lock.*";
-  blfn += "|.*rwlock_.*lock.*";
-  blfn += "|.*rwsem_.*lock.*";
+  blfn += "|.*raw_.*_lock.*";
+  blfn += "|.*raw_.*_unlock.*";
+  blfn += "|.*raw_.*_trylock.*";
+  blfn += "|.*read_lock.*";
+  blfn += "|.*read_unlock.*";
+  blfn += "|.*read_trylock.*";
+  blfn += "|.*write_lock.*";
+  blfn += "|.*write_unlock.*";
+  blfn += "|.*write_trylock.*";
+  blfn += "|.*write_seqlock.*";
+  blfn += "|.*write_sequnlock.*";
+  blfn += "|.*spin_lock.*";
+  blfn += "|.*spin_unlock.*";
+  blfn += "|.*spin_trylock.*";
+  blfn += "|.*spin_is_locked.*";
+  blfn += "|rwsem_.*lock.*";
   blfn += "|.*mutex_.*lock.*";
   blfn += "|raw_.*";
-  blfn += "|.*seq_.*lock.*";

   // atomic functions
   blfn += "|atomic_.*";

All functions now not blacklisted end in _nolock, contain block or clock.

To get a list of blacklisted functions against a particular kernel run:
stap -vvv -l 'kernel.function("*")' 'module.function("*)' 2>&1 | grep ^probe |
grep blacklisted$ | cut -f2 -d\ | cut -f1 -d\@ | sort -u

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/13037] blacklist false positives
  2011-07-28  1:51 [Bug translator/13037] New: blacklist false positives fche at redhat dot com
  2011-07-28  8:01 ` [Bug translator/13037] " mjw at redhat dot com
  2011-07-28 12:09 ` mjw at redhat dot com
@ 2016-05-26 17:56 ` fche at redhat dot com
  2021-03-21 15:43 ` tiberiuzbirnea at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2016-05-26 17:56 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> ---
no current known problems with the blacklist; it may be overridden with -g
anyway

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

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

* [Bug translator/13037] blacklist false positives
  2011-07-28  1:51 [Bug translator/13037] New: blacklist false positives fche at redhat dot com
                   ` (2 preceding siblings ...)
  2016-05-26 17:56 ` fche at redhat dot com
@ 2021-03-21 15:43 ` tiberiuzbirnea at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tiberiuzbirnea at gmail dot com @ 2021-03-21 15:43 UTC (permalink / raw)
  To: systemtap

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

tiberiuzbirnea at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tiberiuzbirnea at gmail dot com

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

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

end of thread, other threads:[~2021-03-21 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-28  1:51 [Bug translator/13037] New: blacklist false positives fche at redhat dot com
2011-07-28  8:01 ` [Bug translator/13037] " mjw at redhat dot com
2011-07-28 12:09 ` mjw at redhat dot com
2016-05-26 17:56 ` fche at redhat dot com
2021-03-21 15:43 ` tiberiuzbirnea at gmail 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).