diff options
| author | Jim Ingham <jingham@apple.com> | 2010-11-04 23:19:21 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2010-11-04 23:19:21 +0000 |
| commit | f7f4f50113e0452d9c6183366d95cf67a4361d63 (patch) | |
| tree | 19e50e52d48657e0222ba475900675ec366c4018 /lldb/source/Commands/CommandObjectLog.cpp | |
| parent | 302448352c1ad969652098846da07361e623ebdf (diff) | |
| download | llvm-f7f4f50113e0452d9c6183366d95cf67a4361d63.zip llvm-f7f4f50113e0452d9c6183366d95cf67a4361d63.tar.gz llvm-f7f4f50113e0452d9c6183366d95cf67a4361d63.tar.bz2 | |
Added a setting to "log timer" so you can see the incremental timings as well:
log timer increment true/false
llvm-svn: 118268
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 2060b1e..7bd84b3 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -413,7 +413,7 @@ public: 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 @@ public: 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()) |
