summaryrefslogtreecommitdiff
path: root/tools/perf/util/xyarray.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-06-14 11:19:16 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-16 16:34:39 +0300
commitb45f65e8fddc89ac6b46388908d3f6ac728be372 (patch)
tree00c67bd22d4adc6aeabeb30eb7be4ddf5c85527c /tools/perf/util/xyarray.h
parentba7ecb02e7b89b09d8cdf4c1514a386af8916c4b (diff)
downloadlinux-b45f65e8fddc89ac6b46388908d3f6ac728be372.tar.xz
perf tools: Introduce xyarray__reset function
To zero all the xyarray contents. It will be used in following patches. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1434269985-521-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/xyarray.h')
-rw-r--r--tools/perf/util/xyarray.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/xyarray.h b/tools/perf/util/xyarray.h
index c488a07275dd..7f30af371b7e 100644
--- a/tools/perf/util/xyarray.h
+++ b/tools/perf/util/xyarray.h
@@ -6,11 +6,13 @@
struct xyarray {
size_t row_size;
size_t entry_size;
+ size_t entries;
char contents[];
};
struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size);
void xyarray__delete(struct xyarray *xy);
+void xyarray__reset(struct xyarray *xy);
static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
{