Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Remove unused xyarray.c as it was moved to tools/lib/perf

Migrated to libperf in:

4b247fa7314ce482 ("libperf: Adopt xyarray class from perf")

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210212043803.365993-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
b1cdc7d3 6edfd0eb

-33
-33
tools/perf/util/xyarray.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #include "xyarray.h" 3 - #include <stdlib.h> 4 - #include <string.h> 5 - #include <linux/zalloc.h> 6 - 7 - struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size) 8 - { 9 - size_t row_size = ylen * entry_size; 10 - struct xyarray *xy = zalloc(sizeof(*xy) + xlen * row_size); 11 - 12 - if (xy != NULL) { 13 - xy->entry_size = entry_size; 14 - xy->row_size = row_size; 15 - xy->entries = xlen * ylen; 16 - xy->max_x = xlen; 17 - xy->max_y = ylen; 18 - } 19 - 20 - return xy; 21 - } 22 - 23 - void xyarray__reset(struct xyarray *xy) 24 - { 25 - size_t n = xy->entries * xy->entry_size; 26 - 27 - memset(xy->contents, 0, n); 28 - } 29 - 30 - void xyarray__delete(struct xyarray *xy) 31 - { 32 - free(xy); 33 - }