sapling/eden/fs/tracing
Matt Glazar a50418112f Optimize TLS lookup in HgImporter
Summary:
D14677339 added tracing to all HgImporter requests. Each trace loads a thread-local variable through EdenStats::getStatsForCurrentThread(). Each of these loads has a small but non-trivial cost.

Because each instance of HgImporter is used only on one thread, each getStatsForCurrentThread() call returns the same EdenThreadStats object. Avoid the thread-local-variable lookups by caching the result of getStatsForCurrentThread() in HgImporter.

This diff should not change behavior.

Reviewed By: simpkins

Differential Revision: D14794284

fbshipit-source-id: d1609a1720d44c680dc0ebaa2536779def2a6f37
2019-04-29 19:21:48 -07:00
..
test build several targets on mac and run 5 test suites 2019-04-18 19:36:20 -07:00
CMakeLists.txt eden: add missing cmake for eden/fs/tracing 2018-12-15 19:11:05 -08:00
EdenStats.cpp Optimize TLS lookup in HgImporter 2019-04-29 19:21:48 -07:00
EdenStats.h Optimize TLS lookup in HgImporter 2019-04-29 19:21:48 -07:00
Tracing.cpp Add lightweight tracing infrastructure 2018-11-01 08:09:19 -07:00
Tracing.h Add lightweight tracing infrastructure 2018-11-01 08:09:19 -07:00