Clang: How to Analyse Compiletime of Templates?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Clang: How to Analyse Compiletime of Templates?

suyash singh via cfe-dev
hello clang-devs,

is clang able to help me to finde the most compiletime consuming
templates in a 500KLOC app
which uses a huge template library - something like a overview what
templates are reasonable to optimize
(in my case hide the template behind a specialized interface)

i've read about /ftime

https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/

but that seems no to help with template instanciation

any advice?

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang: How to Analyse Compiletime of Templates?

suyash singh via cfe-dev
Hi Dennis,

Along with -ftime-trace, try either:
- Clang Build Analyzer: https://aras-p.info/blog/2019/09/28/Clang-Build-Analyzer/
- See++ Compiler Profiler: https://github.com/Viladoman/SeeProfiler


-----Message d'origine-----
De : cfe-dev <[hidden email]> De la part de Dennis Luehring via cfe-dev
Envoyé : March 5, 2020 2:16 PM
À : [hidden email]
Objet : [cfe-dev] Clang: How to Analyse Compiletime of Templates?

hello clang-devs,

is clang able to help me to finde the most compiletime consuming templates in a 500KLOC app which uses a huge template library - something like a overview what templates are reasonable to optimize (in my case hide the template behind a specialized interface)

i've read about /ftime

https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/

but that seems no to help with template instanciation

any advice?

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang: How to Analyse Compiletime of Templates?

suyash singh via cfe-dev
Thx for the links, very promising

Am 05.03.2020 um 20:22 schrieb Alexandre Ganea:

> Hi Dennis,
>
> Along with -ftime-trace, try either:
> - Clang Build Analyzer: https://aras-p.info/blog/2019/09/28/Clang-Build-Analyzer/
> - See++ Compiler Profiler: https://github.com/Viladoman/SeeProfiler
>
>
> -----Message d'origine-----
> De : cfe-dev <[hidden email]> De la part de Dennis Luehring via cfe-dev
> Envoyé : March 5, 2020 2:16 PM
> À : [hidden email]
> Objet : [cfe-dev] Clang: How to Analyse Compiletime of Templates?
>
> hello clang-devs,
>
> is clang able to help me to finde the most compiletime consuming templates in a 500KLOC app which uses a huge template library - something like a overview what templates are reasonable to optimize (in my case hide the template behind a specialized interface)
>
> i've read about /ftime
>
> https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/
>
> but that seems no to help with template instanciation
>
> any advice?
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang: How to Analyse Compiletime of Templates?

suyash singh via cfe-dev
You can also take a look at templight: https://github.com/mikael-s-persson/templight

On Thu, Mar 5, 2020, 8:27 PM Dennis Luehring via cfe-dev <[hidden email]> wrote:
Thx for the links, very promising

Am 05.03.2020 um 20:22 schrieb Alexandre Ganea:
> Hi Dennis,
>
> Along with -ftime-trace, try either:
> - Clang Build Analyzer: https://aras-p.info/blog/2019/09/28/Clang-Build-Analyzer/
> - See++ Compiler Profiler: https://github.com/Viladoman/SeeProfiler
>
>
> -----Message d'origine-----
> De : cfe-dev <[hidden email]> De la part de Dennis Luehring via cfe-dev
> Envoyé : March 5, 2020 2:16 PM
> À : [hidden email]
> Objet : [cfe-dev] Clang: How to Analyse Compiletime of Templates?
>
> hello clang-devs,
>
> is clang able to help me to finde the most compiletime consuming templates in a 500KLOC app which uses a huge template library - something like a overview what templates are reasonable to optimize (in my case hide the template behind a specialized interface)
>
> i've read about /ftime
>
> https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/
>
> but that seems no to help with template instanciation
>
> any advice?
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang: How to Analyse Compiletime of Templates?

suyash singh via cfe-dev
In reply to this post by suyash singh via cfe-dev
i get this assertion (using latest Windows
Build(https://llvm.org/builds/) installer + VStudio extension)

1>Assertion failed: TimeTraceProfilerInstance == nullptr && "Profiler
should not be initialized", file
C:\src\llvm_package_2663a25f\llvm-project\llvm\lib\Support\TimeProfiler.cpp,
line 253
1>Stack dump:

assert in Function: void timeTraceProfilerInitialize(unsigned
TimeTraceGranularity)



Am 05.03.2020 um 20:22 schrieb Alexandre Ganea:

> Hi Dennis,
>
> Along with -ftime-trace, try either:
> - Clang Build Analyzer: https://aras-p.info/blog/2019/09/28/Clang-Build-Analyzer/
> - See++ Compiler Profiler: https://github.com/Viladoman/SeeProfiler
>
>
> -----Message d'origine-----
> De : cfe-dev <[hidden email]> De la part de Dennis Luehring via cfe-dev
> Envoyé : March 5, 2020 2:16 PM
> À : [hidden email]
> Objet : [cfe-dev] Clang: How to Analyse Compiletime of Templates?
>
> hello clang-devs,
>
> is clang able to help me to finde the most compiletime consuming templates in a 500KLOC app which uses a huge template library - something like a overview what templates are reasonable to optimize (in my case hide the template behind a specialized interface)
>
> i've read about /ftime
>
> https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/
>
> but that seems no to help with template instanciation
>
> any advice?
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang: How to Analyse Compiletime of Templates?

suyash singh via cfe-dev
-ftime-trace Option gives this error on both Project properties

VStudio Project properties
   Configuration Properties -> C/C++ -> Command Line
   Configuration Properties -> LLVM -> Additional Compiler Options

the very same LLVM/clang-cl installation works with -ftime-trace on a
much bigger project of my colleague


Am 09.03.2020 um 08:54 schrieb Dennis Luehring via cfe-dev:

> i get this assertion (using latest Windows
> Build(https://llvm.org/builds/) installer + VStudio extension)
>
> 1>Assertion failed: TimeTraceProfilerInstance == nullptr && "Profiler
> should not be initialized", file
> C:\src\llvm_package_2663a25f\llvm-project\llvm\lib\Support\TimeProfiler.cpp,
> line 253
> 1>Stack dump:
>
> assert in Function: void timeTraceProfilerInitialize(unsigned
> TimeTraceGranularity)
>
>
>
> Am 05.03.2020 um 20:22 schrieb Alexandre Ganea:
> > Hi Dennis,
> >
> > Along with -ftime-trace, try either:
> > - Clang Build Analyzer: https://aras-p.info/blog/2019/09/28/Clang-Build-Analyzer/
> > - See++ Compiler Profiler: https://github.com/Viladoman/SeeProfiler
> >
> >
> > -----Message d'origine-----
> > De : cfe-dev <[hidden email]> De la part de Dennis Luehring via cfe-dev
> > Envoyé : March 5, 2020 2:16 PM
> > À : [hidden email]
> > Objet : [cfe-dev] Clang: How to Analyse Compiletime of Templates?
> >
> > hello clang-devs,
> >
> > is clang able to help me to finde the most compiletime consuming templates in a 500KLOC app which uses a huge template library - something like a overview what templates are reasonable to optimize (in my case hide the template behind a specialized interface)
> >
> > i've read about /ftime
> >
> > https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/
> >
> > but that seems no to help with template instanciation
> >
> > any advice?
> >
> > _______________________________________________
> > cfe-dev mailing list
> > [hidden email]
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev