* Fixed my fix for make_space() wrapping. It's always a good idea to

write code aligned to what one has written in the comment (or the
  other way around).
* Made trace_entry structure doubly linked, by introducing a
  previous_size member. By using bit fields, shrinking the flags field
  to 4 bits, and not saving the lower two bits of size and previous_size
  (which are always 0 due to alignment), the structure remains 4 byte
  sized and can still address the same entry size.
* kBufferSize is no longer one less than it could be.
* "traced" command:
  - Use static variable for the iteration state rather then cluttering
    the temporary debug variable name space.
  - The <count> parameter can now be negative, in which case the entries
    before (and including) <start> are printed.
  - Added a new optional parameter, specifying the maximal number of
    entries to be filtered. Filtered iteration is beautifully
    comfortable now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23678 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-01-21 00:41:45 +00:00
parent 902425896d
commit 6d36996620
2 changed files with 294 additions and 70 deletions
+4 -3
View File
@@ -11,8 +11,9 @@
struct trace_entry {
uint16 size;
uint16 flags;
uint32 size : 14; // actual size is *4
uint32 previous_size : 14; // actual size is *4
uint32 flags : 4;
};
#ifdef __cplusplus
@@ -37,7 +38,7 @@ class TraceOutput {
size_t fSize;
};
class TraceEntry : trace_entry {
class TraceEntry : public trace_entry {
public:
TraceEntry();
virtual ~TraceEntry();