Add repeat counting to system trace.

This make the system trace check for repeating lines, and only print a "(last
message repeated n lines.)" instead of the real message multiple times. This
keeps the trace much shorter if messages are repeated. The drawback is that the
replacement count message will only get printed on the next line getting
traced, so until that happens it swallows the repeated lines.
Before saving the systrace buffer is flushed, so this should not raise a problem.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25878 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2010-05-07 16:18:41 +00:00
parent 227e619bbf
commit feecb7d4be
2 changed files with 30 additions and 4 deletions

View file

@ -34,8 +34,11 @@ class SysTrace : public QDialog
static QString getTrace() {return debugbuffer;}
static void save(QString filename = "");
private:
static void flush(void);
Ui::SysTraceFrm ui;
static QString debugbuffer;
static QString lastmessage;
static unsigned int repeat;
private slots:
void saveCurrentTrace(void);