]> git.ipfire.org Git - thirdparty/git.git/commit - dir.c
trace.h: support nested performance tracing
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 18 Aug 2018 14:41:22 +0000 (16:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 18 Aug 2018 16:47:46 +0000 (09:47 -0700)
commitc46c406ae1ee30f64a13083edfa5683d2685fd61
tree5e632617017349a94b5357aaad6bf2a52c64032a
parentfa03cdc39b951d1cfbfd690fe6f3ac6c57ab6a44
trace.h: support nested performance tracing

Performance measurements are listed right now as a flat list, which is
fine when we measure big blocks. But when we start adding more and
more measurements, some of them could be just part of a bigger
measurement and a flat list gives a wrong impression that they are
executed at the same level instead of nested.

Add trace_performance_enter() and trace_performance_leave() to allow
indent these nested measurements. For now it does not help much
because the only nested thing is (lazy) name hash initialization
(e.g. called in diff-index from "git status"). This will help more
because I'm going to add some more tracing that's actually nested.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c
dir.c
name-hash.c
preload-index.c
read-cache.c
trace.c
trace.h