Added a setting to "log timer" so you can see the incremental timings as well:
log timer increment true/false
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118268 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectLog.cpp b/source/Commands/CommandObjectLog.cpp
index 2060b1e..7bd84b3 100644
--- a/source/Commands/CommandObjectLog.cpp
+++ b/source/Commands/CommandObjectLog.cpp
@@ -413,7 +413,7 @@
CommandObject (interpreter,
"log timers",
"Enable, disable, dump, and reset LLDB internal performance timers.",
- "log timers < enable <depth> | disable | dump | reset >")
+ "log timers < enable <depth> | disable | dump | increment <bool> | reset >")
{
}
@@ -472,6 +472,18 @@
else
result.AppendError("Could not convert enable depth to an unsigned integer.");
}
+ if (strcasecmp(sub_command, "increment") == 0)
+ {
+ bool success;
+ bool increment = Args::StringToBoolean(args.GetArgumentAtIndex(1), false, &success);
+ if (success)
+ {
+ Timer::SetQuiet (!increment);
+ result.SetStatus(eReturnStatusSuccessFinishNoResult);
+ }
+ else
+ result.AppendError("Could not convert increment value to boolean.");
+ }
}
if (!result.Succeeded())