summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/TimeProfiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Time profiler: optimize json output timeAnton Afanasyev2019-04-161-0/+5
| | | | | | | | | | | | | | | | | | Summary: Use llvm::json::Array.reserve() to optimize json output time. Here is motivation: https://reviews.llvm.org/D60609#1468941. In short: for the json array with ~32K entries, pushing back each entry takes ~4% of whole time compared to the method of preliminary memory reservation: (3995-3845)/3995 = 3.75%. Reviewers: lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60792 llvm-svn: 358522
* Use native llvm JSON library for time profiler outputAnton Afanasyev2019-04-161-37/+37
| | | | | | | | | | | | | | Summary: Replace plain json text output with llvm JSON library wrapper using. Reviewers: takuto.ikuta, lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60609 llvm-svn: 358476
* Time profiler: small fixes and optimizationsAnton Afanasyev2019-04-151-35/+43
| | | | | | | | | | | | | | Summary: Fixes from Roman's review here: https://reviews.llvm.org/D58675#1465336 Reviewers: lebedev.ri Subscribers: hiraditya, mgrang, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60663 llvm-svn: 358448
* Improve hashing for time profilerAnton Afanasyev2019-04-091-16/+19
| | | | | | | | | | | | | | | | Summary: Use optimized hashing while writing time trace by join two hashes to one. Used for -ftime-trace option. Reviewers: rnk, takuto.ikuta Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60404 llvm-svn: 357998
* Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` ↵Anton Afanasyev2019-03-301-0/+184
compatible JSON profiling output dumps. This change adds hierarchical "time trace" profiling blocks that can be visualized in Chrome, in a "flame chart" style. Each profiling block can have a "detail" string that for example indicates the file being processed, template name being instantiated, function being optimized etc. This is taken from GitHub PR: https://github.com/aras-p/llvm-project-20170507/pull/2 Patch by Aras Pranckevičius. Differential Revision: https://reviews.llvm.org/D58675 llvm-svn: 357340
OpenPOWER on IntegriCloud