June 24, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Saturday, 22 June 2013 at 21:41:15 UTC, Walter Bright wrote:
> Compiling std.algorithm for unittests consumes all the memory on many machines. I've been looking into what is allocating all that memory, and it isn't so easy without adding instrumentation code anywhere.
>
> Anyone know of a convenient tool to do this on Linux?
>
> (valgrind just hangs, or at least I gave up on it after 6 hours)
Just wanted to add that with the latest release, I can't compile algorithm in unittest mode with -inline -O -release.
This is actually an important test to run, as algorithm has a tendency to create "unreachable statement" error due to better flow analysis.
|
June 24, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to dennis luehring | On Sunday, 23 June 2013 at 12:23:14 UTC, dennis luehring wrote:
>
> http://www.softwareverify.com/cpp-memory.php - i like this one
>
I've used that at work, though mainly for looking for leaks rather than memory profiling.
Might try running DMD thruogh it if i get some time.
|
June 24, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 06/23/2013 03:19 AM, Walter Bright wrote: > On 6/22/2013 4:24 PM, Kiith-Sa wrote: >> With valgrind; did you use massif? >> That would be the right tool to use instead of memcheck (the default >> tool). > > I've never heard of massif. Will check it out. I tried it, works nice. No graphical output though. 1. compile dmd with debug symbols (-g) 2. valgrind --tool=massif ../dmd/src/dmd -main -unittest std/algorithm 3. ms_print massif.out.%PID% > outfile http://valgrind.org/docs/manual/ms-manual.html |
June 24, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | 24-Jun-2013 22:47, Martin Nowak пишет: > On 06/23/2013 03:19 AM, Walter Bright wrote: >> On 6/22/2013 4:24 PM, Kiith-Sa wrote: >>> With valgrind; did you use massif? >>> That would be the right tool to use instead of memcheck (the default >>> tool). >> >> I've never heard of massif. Will check it out. > > I tried it, works nice. No graphical output though. > > 1. compile dmd with debug symbols (-g) > 2. valgrind --tool=massif ../dmd/src/dmd -main -unittest std/algorithm > 3. ms_print massif.out.%PID% > outfile > > http://valgrind.org/docs/manual/ms-manual.html There is a massif-visualizer tool that works nicely for me. -- Dmitry Olshansky |
June 25, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | On Monday, 24 June 2013 at 18:47:17 UTC, Martin Nowak wrote:
> On 06/23/2013 03:19 AM, Walter Bright wrote:
>> On 6/22/2013 4:24 PM, Kiith-Sa wrote:
>>> With valgrind; did you use massif?
>>> That would be the right tool to use instead of memcheck (the default
>>> tool).
>>
>> I've never heard of massif. Will check it out.
>
> I tried it, works nice. No graphical output though.
>
> 1. compile dmd with debug symbols (-g)
> 2. valgrind --tool=massif ../dmd/src/dmd -main -unittest std/algorithm
> 3. ms_print massif.out.%PID% > outfile
>
> http://valgrind.org/docs/manual/ms-manual.html
sudo apt-get install massif-visualizer
(on a newish debian/ubuntu/mint/etc)
|
June 25, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Another possibility is to comment some tests and see if valgrind finishes. |
June 25, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Richard Webb | On 24/06/2013 13:11, Richard Webb wrote: > On Sunday, 23 June 2013 at 12:23:14 UTC, dennis luehring wrote: >> >> http://www.softwareverify.com/cpp-memory.php - i like this one >> > > > I've used that at work, though mainly for looking for leaks rather than > memory profiling. > Might try running DMD thruogh it if i get some time. I had a go at running the VC build of DMD through Memory Validator, using "-release -unittest -c D:\DTesting\dmd.2.063\src\phobos\std\algorithm.d". It ran for about 45 mins, completed, and then locked up :-( I've put a screen shot of the object types list @ <http://tinyurl.com/qybudb4> as an example of what it shows - didn't get a chance to look at anything else before it fell over. |
June 25, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Richard Webb | Am 25.06.2013 16:18, schrieb Richard Webb:
> On 24/06/2013 13:11, Richard Webb wrote:
>> On Sunday, 23 June 2013 at 12:23:14 UTC, dennis luehring wrote:
>>>
>>> http://www.softwareverify.com/cpp-memory.php - i like this one
>>>
>>
>>
>> I've used that at work, though mainly for looking for leaks rather than
>> memory profiling.
>> Might try running DMD thruogh it if i get some time.
>
>
> I had a go at running the VC build of DMD through Memory Validator,
> using "-release -unittest -c
> D:\DTesting\dmd.2.063\src\phobos\std\algorithm.d".
>
> It ran for about 45 mins, completed, and then locked up :-(
>
>
> I've put a screen shot of the object types list @
> <http://tinyurl.com/qybudb4> as an example of what it shows - didn't get
> a chance to look at anything else before it fell over.
>
MTuner works - but i can't find a export or report feature
|
June 27, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Sunday, 23 June 2013 at 15:22:22 UTC, Jacob Carlborg wrote: > On 2013-06-23 15:12, qznc wrote: > >> That would be SystemTap on Linux. However, I wonder if it is the right >> tool for the job. > > Mac OS X has Instruments as well, which is used for these type of tasks. It's built on top of Dtrace: > > http://en.wikipedia.org/wiki/Instruments_(application) here is a comparion of Systemtap and DTrace http://sourceware.org/systemtap/wiki/SystemtapDtraceComparison |
June 27, 2013 Re: memory allocation in dmd | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick B | On Thursday, 27 June 2013 at 22:12:49 UTC, Nick B wrote: > On Sunday, 23 June 2013 at 15:22:22 UTC, Jacob Carlborg wrote: >> On 2013-06-23 15:12, qznc wrote: >> >>> That would be SystemTap on Linux. However, I wonder if it is the right >>> tool for the job. >> [snip] > > > here is a comparion of Systemtap and DTrace > > > http://sourceware.org/systemtap/wiki/SystemtapDtraceComparison here is the SystemTap FAQ http://sourceware.org/systemtap/wiki/SystemTapFAQ it looks to be a very usefull tool. Nick |
Copyright © 1999-2021 by the D Language Foundation