-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
external/trace: Add support for dumping multiple buffers
dump_trace only can dump one trace buffer at a time. It would be handy to be able to dump multiple buffers and to see the entries from these buffers displayed in correct timestamp order. Each trace buffer is already sorted by timestamp so use a heap to implement an efficient k-way merge. Use the CCAN heap to implement this sort. However the CCAN heap does not have a 'heap_replace' operation. We need to 'heap_pop' then 'heap_push' to replace the root which means rebalancing twice instead of once. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
- Loading branch information
1 parent
3d6aca2
commit a5038b4
Showing
3 changed files
with
135 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
HOSTEND=$(shell uname -m | sed -e 's/^i.*86$$/LITTLE/' -e 's/^x86.*/LITTLE/' -e 's/^ppc64le/LITTLE/' -e 's/^ppc.*/BIG/') | ||
CFLAGS=-g -Wall -DHAVE_$(HOSTEND)_ENDIAN -I../../include -I../../ | ||
|
||
dump_trace: dump_trace.c trace.c | ||
dump_trace: dump_trace.c trace.c ../../ccan/heap/heap.c | ||
|
||
clean: | ||
rm -f dump_trace *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters