• Duy Nguyen's avatar
    trace.h: support nested performance tracing · c46c406a
    Duy Nguyen authored
    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: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
diff-lib.c 15 KB