On 5/31/2012 10:18 PM, 齐玉华 wrote:
Thanks for your quick reply. Here is the detailed information:
The good2.php is attached.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
grace@grace:~/software/WAutoRepair/experiment/php/php_null$ valgrind --version
valgrind-3.7.0
grace@grace:~/software/WAutoRepair/experiment/php/php_null$ uname -a
Linux grace 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 i686 GNU/Linux grace@grace:~/software/WAutoRepair/experiment/php/php_null$ /home/grace/software/WAutoRepair/experiment/php/php_null/php-src-5.3/sapi/cli/php --version
PHP 5.3.7RC4-dev (cli) (built: May 21 2012 23:48:55)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
grace@grace:~/software/WAutoRepair/experiment/php/php_null$time /home/grace/software/WAutoRepair/experiment/php/php_null/php-src-5.3/sapi/cli/php good2.php 6

real    0m0.009s
user    0m0.004s
sys    0m0.008s
grace@grace:~/software/WAutoRepair/experiment/php/php_null$time valgrind --tool=none -q /home/grace/software/WAutoRepair/experiment/php/php_null/php-src-5.3/sapi/cli/php good2.php
6

real    0m1.086s
user    0m1.048s
sys    0m0.040s

This could very easily be valgrind startup time, not the slowdown from valgrind's instruction simulator.

As requested by the previous post, please try "valgrind --tool=none ls" and compare the run time with "ls" by itself.


grace@grace:~/software/WAutoRepair/experiment/php/php_null$time /home/grace/software/WAutoRepair/experiment/php/php_null/php-src-5.3/sapi/cli/php --version
PHP 5.3.7RC4-dev (cli) (built: May 21 2012 23:48:55)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

real    0m0.008s
user    0m0.004s
sys    0m0.008s
grace@grace:~/software/WAutoRepair/experiment/php/php_null$ time valgrind --tool=none -q /home/grace/software/WAutoRepair/experiment/php/php_null/php-src-5.3/sapi/cli/php --version
PHP 5.3.7RC4-dev (cli) (built: May 21 2012 23:48:55)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

real    0m0.948s
user    0m0.904s
sys    0m0.044s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the set of test cases are numerous(e.g. 1000), then the php will incur significantly performance degradation. I am waiting in hope for your insightful advices. Thanks again.

If your test cases run in 0.01 seconds each now but will run in 1 second under valgrind, 1000 tests will take about 20 minutes. Why is this a problem? You won't be running valgrind every time you launch PHP.

What happens when you run a large PHP script under valgrind? Do you still see 25x or 100x slowdown?



在 2012-06-01 10:40:59,"John Reiser"<jrei...@bitwagon.com  
<mailto:jrei...@bitwagon.com>>  写道:
>On 05/31/2012 07:10 PM, 齐玉华 wrote:
>>   I try to use Valgrind to wrap some functions in target sotfwares such as 
php, libtiff. But i found that valgrind will slow down them significantly(up to 25 
times slowwer), even if run valgrind with '--tool=none'. And as described in valgrind 
mannual, there should be 5 times slowwer than native
>>  running. I am confused, so anyone can help me to reduce the 
instrumentation-cost with some suggestions? I am waiting in hope for your advices. 
Thanks.
>
>Please tell us the version of valgrind (the output of "valgrind --version"
>when fed to a shell), which hardware (x86_64, i686, PowerPC 64-bit, ARMv7,
>etc.), and which operating system and release (Ubuntu Linux 12.04, Android 4.1,
>MacOS 10.8 Darwin, etc.)
>
>How much slow-down do you observe for simple programs, such as
>"valgrind --tool=none date", or 'ls', 'who', etc?
>
>-- >








------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


--
    David Chapman      dcchap...@acm.org
    Chapman Consulting -- San Jose, CA
    Software Development Done Right.
    www.chapman-consulting-sj.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to