[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [valgrind] [Bug 79362] Debug info is lost for .so files when they are dlclose'd
From:       Philippe Waroquiers <bugzilla_noreply () kde ! org>
Date:       2017-08-04 13:04:58
Message-ID: bug-79362-17878-YYEKIU8Zix () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=79362

--- Comment #70 from Philippe Waroquiers <philippe.waroquiers@skynet.be> ---
Following discussion on irc of the suggestion discussed in comment 63 till
comment 67,
I will attach a patch that adds some measurement code for the scanning of the
EC contexts
that would be needed at each unload of a .so.

The measurement is done by applying the patch, and then doing:

for n in 10 11 12 13 14 15 16 17 18 19 20 25
do
   ./vg-in-place --stats=yes --time-stamp=yes --num-callers=$n ./perf/many-xpts 
done |& grep -e 'exe.*scanning'


Detailed results below. Basically, (as expected), the time to scan depends on
the 
nr of execontexts, and the avg size of each execontext.
For a huge data set (260_000 EC, 6_300_000 ips) , a scan takes about 0.005
seconds
A medium size data set (65_000 EC, 1_100_000 ips), a scan takes about 0.001
seconds.
(debian 8, Intel i5-6402P CPU @ 2.80GHz)
So, the cost seems reasonable, e.g. 5 seconds CPU in total for a big
application
that would do 1000 load/unload of a .so.

We might possibly avoid this scanning if ever it would be needed, e.g. by
maintaining
a list of DI valid for a certain epoch, and another data structure that
associates
the current epoch with past 'compatible' epoch.
But that seems more complex than the simple scanning solution at each unload.


--00:00:00:01.298 11342--    exectx: scanning 1000 times 515 contexts/5,133 ips
--00:00:00:01.299 11342--    exectx: finished scanning 515 contexts/5,133 ips
--00:00:00:01.308 11345--    exectx: scanning 1000 times 1,027 contexts/11,277
ips
--00:00:00:01.310 11345--    exectx: finished scanning 1,027 contexts/11,277
ips
--00:00:00:01.341 11348--    exectx: scanning 1000 times 2,051 contexts/24,589
ips
--00:00:00:01.347 11348--    exectx: finished scanning 2,051 contexts/24,589
ips
--00:00:00:01.357 11351--    exectx: scanning 1000 times 4,099 contexts/53,261
ips
--00:00:00:01.381 11351--    exectx: finished scanning 4,099 contexts/53,261
ips
--00:00:00:01.403 11354--    exectx: scanning 1000 times 8,195 contexts/114,701
ips
--00:00:00:01.485 11354--    exectx: finished scanning 8,195 contexts/114,701
ips
--00:00:00:01.420 11357--    exectx: scanning 1000 times 16,387
contexts/245,773 ips
--00:00:00:01.584 11357--    exectx: finished scanning 16,387 contexts/245,773
ips
--00:00:00:01.405 11360--    exectx: scanning 1000 times 32,771
contexts/524,301 ips
--00:00:00:01.787 11360--    exectx: finished scanning 32,771 contexts/524,301
ips
--00:00:00:01.494 11363--    exectx: scanning 1000 times 65,539
contexts/1,114,125 ips
--00:00:00:02.447 11363--    exectx: finished scanning 65,539
contexts/1,114,125 ips
--00:00:00:01.576 11373--    exectx: scanning 1000 times 131,076
contexts/2,359,327 ips
--00:00:00:03.952 11373--    exectx: finished scanning 131,076
contexts/2,359,327 ips
--00:00:00:01.782 11376--    exectx: scanning 1000 times 262,149
contexts/4,980,787 ips
--00:00:00:06.319 11376--    exectx: finished scanning 262,149
contexts/4,980,787 ips
--00:00:00:01.798 11379--    exectx: scanning 1000 times 262,149
contexts/5,242,933 ips
--00:00:00:06.832 11379--    exectx: finished scanning 262,149
contexts/5,242,933 ips
--00:00:00:01.825 11382--    exectx: scanning 1000 times 262,149
contexts/6,291,514 ips
--00:00:00:06.545 11382--    exectx: finished scanning 262,149
contexts/6,291,514 ips

-- 
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic