Jump to page: 1 2
Thread overview
pprof DLang needs?
Apr 20, 2020
zoujiaqing
Apr 20, 2020
Andrej Mitrovic
Apr 20, 2020
Jacob Carlborg
Apr 20, 2020
zoujiaqing
Nov 20, 2020
zoujiaqing
Nov 20, 2020
Guillaume Piolat
Nov 22, 2020
zoujiaqing
Apr 20, 2020
welkam
Apr 20, 2020
zoujiaqing
Apr 20, 2020
welkam
Apr 20, 2020
Tim
Apr 20, 2020
welkam
Apr 21, 2020
Eduard Staniloiu
Apr 24, 2020
zoujiaqing
May 03, 2020
Tim
April 20, 2020
PHP use xhprof analysis performance
Golang use pprof analysis performance
Rust use pprof-rs analysis performance
D language also needs a tool like this.

[0] https://github.com/google/pprof
[1] https://github.com/facebook/xhprof
[2] https://docs.rs/pprof/0.3.16/pprof
April 20, 2020
On Monday, 20 April 2020 at 01:59:31 UTC, zoujiaqing wrote:
> PHP use xhprof analysis performance
> Golang use pprof analysis performance
> Rust use pprof-rs analysis performance
> D language also needs a tool like this.
>
> [0] https://github.com/google/pprof
> [1] https://github.com/facebook/xhprof
> [2] https://docs.rs/pprof/0.3.16/pprof

Vladimir had a D memory profiler implemented a while ago: https://github.com/CyberShadow/Diamond

I'm not sure if it still compiles though.
April 20, 2020
On 2020-04-20 03:59, zoujiaqing wrote:
> PHP use xhprof analysis performance
> Golang use pprof analysis performance
> Rust use pprof-rs analysis performance
> D language also needs a tool like this.
> 
> [0] https://github.com/google/pprof
> [1] https://github.com/facebook/xhprof
> [2] https://docs.rs/pprof/0.3.16/pprof

DMD has the `-profile` flag. D programs should work in profilers for C/C++ as well.

-- 
/Jacob Carlborg
April 20, 2020
I use perf:
perf record -g <program_name>
then
perf report -g 'graph,0.5,caller'

And for memory usage I use heaptrack. The new tool you propose needs to bring something new to be worth using over the others and I dont think rewriting tools that already exist is worth it. Better improve existing ones. The only thing my mentioned tools are missing is D symbol demangling.
April 20, 2020
On Monday, 20 April 2020 at 07:49:33 UTC, Jacob Carlborg wrote:
> On 2020-04-20 03:59, zoujiaqing wrote:
>> PHP use xhprof analysis performance
>> Golang use pprof analysis performance
>> Rust use pprof-rs analysis performance
>> D language also needs a tool like this.
>> 
>> [0] https://github.com/google/pprof
>> [1] https://github.com/facebook/xhprof
>> [2] https://docs.rs/pprof/0.3.16/pprof
>
> DMD has the `-profile` flag. D programs should work in profilers for C/C++ as well.

Thanks Jacob, I know `dub build --build=profile`, but many projects can't be used.

zoujiaqing@osx:~/projects/hunt-net/examples/echo
> dub build --build=profile                                                                            master [3dbfc4a]
Performing "profile" build using /Library/D/dmd/bin/dmd for x86_64.
hunt 1.4.9: building configuration "library"...
/Library/D/dmd/src/phobos/std/concurrency.d(2053,17): Warning: statement is not reachable
/Library/D/dmd/bin/dmd failed with exit code 1.
April 20, 2020
On Monday, 20 April 2020 at 08:28:43 UTC, welkam wrote:
> I use perf:
> perf record -g <program_name>
> then
> perf report -g 'graph,0.5,caller'
>
> And for memory usage I use heaptrack. The new tool you propose needs to bring something new to be worth using over the others and I dont think rewriting tools that already exist is worth it. Better improve existing ones. The only thing my mentioned tools are missing is D symbol demangling.

Thanks, I will be try :)
April 20, 2020
On Monday, 20 April 2020 at 11:11:22 UTC, zoujiaqing wrote:
> On Monday, 20 April 2020 at 08:28:43 UTC, welkam wrote:
>> I use perf:
>> perf record -g <program_name>
>> then
>> perf report -g 'graph,0.5,caller'
>>
>> And for memory usage I use heaptrack. The new tool you propose needs to bring something new to be worth using over the others and I dont think rewriting tools that already exist is worth it. Better improve existing ones. The only thing my mentioned tools are missing is D symbol demangling.
>
> Thanks, I will be try :)

Tools that work with C programs also work with D programs. Also it would be nice to know what kind of information are you looking for. If you want to know what functions consume what time then there are plenty of tools. If you want to profile mutexes then it might be hard to do that with available tools. Just saying that D needs profiling tool is not enough to get to executable plan
April 20, 2020
On Monday, 20 April 2020 at 08:28:43 UTC, welkam wrote:
> And for memory usage I use heaptrack. The new tool you propose needs to bring something new to be worth using over the others and I dont think rewriting tools that already exist is worth it. Better improve existing ones. The only thing my mentioned tools are missing is D symbol demangling.

heaptrack looks interesting. Unfortunately it only found allocations with malloc for me. Is there an option or a fork, which also tracks allocations on the D heap?
April 20, 2020
On Monday, 20 April 2020 at 17:30:11 UTC, Tim wrote:
> allocations on the D heap?
Whats that? You mean GC heap? I tried that tool on DMD and it found its custom allocator so it did all the things I needed it for. But yeah for better support you would need to modify the source and since its written in C++ I dont think I will touch it.


April 21, 2020
On Monday, 20 April 2020 at 21:22:37 UTC, welkam wrote:
> On Monday, 20 April 2020 at 17:30:11 UTC, Tim wrote:
>> allocations on the D heap?
> Whats that? You mean GC heap? I tried that tool on DMD and it found its custom allocator so it did all the things I needed it for. But yeah for better support you would need to modify the source and since its written in C++ I dont think I will touch it.

I just want to add that valgrind works really well with D.
You can use massif to profile the heap allocations [0].

[0] - https://www.valgrind.org/docs/manual/ms-manual.html
« First   ‹ Prev
1 2