[Skiboot] [PATCH v2 14/16] ccan: Add CCAN heap source

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Sep 20 03:27:01 AEST 2019


On 4/2/19 5:13 AM, Jordan Niethe wrote:
> We would like to be able to use dump_trace to dump multiple trace
> buffers at a time. The entries should be displayed in timestamp order.
> As each buffer is already ordered on timestamp, a k-way merge is an
> efficient method to sort the buffers together by timestamp. A heap can
> be used to implement a k-way merge. As CCAN is already included in
> Skiboot, use the CCAN heap. Add the source for heap.
> 
> Signed-off-by: Jordan Niethe <jniethe5 at gmail.com>
> ---
>   ccan/Makefile.inc    |   4 +-
>   ccan/heap/LICENSE    |   1 +
>   ccan/heap/_info      |  68 ++++++++++++++++++++++
>   ccan/heap/heap.c     | 119 ++++++++++++++++++++++++++++++++++++++
>   ccan/heap/heap.h     | 122 +++++++++++++++++++++++++++++++++++++++
>   ccan/heap/test/run.c | 133 +++++++++++++++++++++++++++++++++++++++++++
>   6 files changed, 445 insertions(+), 2 deletions(-)
>   create mode 120000 ccan/heap/LICENSE
>   create mode 100644 ccan/heap/_info
>   create mode 100644 ccan/heap/heap.c
>   create mode 100644 ccan/heap/heap.h
>   create mode 100644 ccan/heap/test/run.c
> 
> diff --git a/ccan/Makefile.inc b/ccan/Makefile.inc
> index 36e75774a716..546891b62328 100644
> --- a/ccan/Makefile.inc
> +++ b/ccan/Makefile.inc
> @@ -1,7 +1,7 @@
>   # -*-Makefile-*-
> 
> -SUBDIRS += ccan ccan/list ccan/str
> -CCAN_OBJS = list/list.o str/str.o
> +SUBDIRS += ccan ccan/list ccan/str ccan/heap
> +CCAN_OBJS = list/list.o str/str.o heap/heap.o
>   CCAN=ccan/built-in.a
> 
>   $(CCAN): $(CCAN_OBJS:%=ccan/%)
> diff --git a/ccan/heap/LICENSE b/ccan/heap/LICENSE
> new file mode 120000
> index 000000000000..2354d12945d3
> --- /dev/null
> +++ b/ccan/heap/LICENSE
> @@ -0,0 +1 @@
> +../../licenses/BSD-MIT

Looks like you missed to add ./license/BSD-MIT file ?

-Vasant



More information about the Skiboot mailing list