This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11474] New: iotop example is very slow in pass-2
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 7 Apr 2010 02:40:19 -0000
- Subject: [Bug translator/11474] New: iotop example is very slow in pass-2
- Reply-to: sourceware-bugzilla at sourceware dot org
Usually stap takes 2-3 seconds in pass 2 to process the iotop example. Starting
with commit 84b869bb, stap takes ~45 seconds.
I think it is not really a problem with this particular commit, but rather that
a poor performance path has been exposed in @cast. @cast will iterate over all
CUs looking for a type declaration (using dwflpp::declaration_resolve in each
CU). However, starting with commit 063906a9, declaration_resolve will also
iterate over every CU.
This is ok when the type is found, because the @cast iteration will always find
it on the first CU (possible via other CUs in declaration_resolve). But if the
type is NOT present, we get an O(N^2) search to find our failure.
Since commit 84b869bb added a bunch of @defined(@cast...), there are many
lookups that will fail, and so we wait.
(Analysis is partly by intuition, results are not guaranteed...)
PS: Wouldn't it be nice if bugzilla linked to git log? Here's are the commits:
commit 84b869bbf6a14f2640b97e937c11705fa7861076
Author: David Smith <dsmith@redhat.com>
Date: Tue Apr 6 10:04:30 2010 -0500
PR 9871 (partial) fix. Removed more embedded-C in nfs_proc.stp and nfs.stp.
* tapset/nfs_proc.stp: Added script functions NFS_I(), NFS_FH(),
NFS_SERVER, NFS_PROTO. Rewrote embedded-C functions __nfsv4_bitmask()
and __getfh_inode() in script language.
* tapset/nfs.stp: Rewrote embedded-C functions __nfsi_cache_valid(),
__nfsi_rcache_time(), __nfsi_attr_time(), __nfsi_ndirty(),
__nfs_server_rsize(), __nfs_version(), __nfs_server_wsize(),
__nfs_rpages(), and __nfs_wpages() in script language.
commit 063906a93ee3ea5b976f43e2dd1f73d29605fa4c
Author: Mark Wielaard <mjw@redhat.com>
Date: Tue Nov 17 22:20:32 2009 +0100
Search other CUs of the module when resolving declarations.
* dwflpp.h (declaration_resolve_other_cus): New method.
(iterate_over_globals): Mark as static and takes a CU to iterate over.
(global_alias_caching_callback_cus): New method.
* dwflpp.cxx (global_alias_caching_callback_cus): New method.
(declaration_resolve_other_cus): New method.
(declaration_resolve): Call iterate_over_globals() with current cu.
Call declaration_resolve_other_cus() when name not found.
(iterate_over_globals): Takes cu_die to iterate over as argument.
--
Summary: iotop example is very slow in pass-2
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: jistone at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11474
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.