[Lldb-commits] [PATCH] D61247: Add more information to the log timer dump

António Afonso via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Apr 28 18:47:25 PDT 2019


aadsm created this revision.
Herald added subscribers: lldb-commits, jfb, erik.pilkington, aprantl.
Herald added a project: LLDB.
aadsm abandoned this revision.

The `log timer dump` is showing the time of the function itself minus any function that is called from this one that also happens to be timed. However, this is really not obvious and it also makes it hard to understand the time spent in total and also which children are actually taking the time.
To get a better reading of the timer dump I added the total, children (which I abbreviated to child) and also the hit count. I used these timers to figure out a performance issue and only after adding this things were more clear to me.

It looks like this:

  (lldb) log timer dump
  35.447713617 sec (total: 35.449s; child: 0.001s; count: 1374) for void SymbolFileDWARF::Index()
  29.717921481 sec (total: 29.718s; child: 0.000s; count: 8230500) for const lldb_private::ConstString &lldb_private::Mangled::GetDemangledName(lldb::LanguageType) const
  21.049508865 sec (total: 24.683s; child: 3.633s; count: 1399) for void lldb_private::Symtab::InitNameIndexes()
  ...


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61247

Files:
  lldb/include/lldb/Utility/Timer.h
  lldb/source/Utility/Timer.cpp
  lldb/unittests/Utility/TimerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61247.197046.patch
Type: text/x-patch
Size: 5588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190429/40e21d15/attachment.bin>


More information about the lldb-commits mailing list