1 // SPDX-License-Identifier: GPL-2.0 2 #include <stdlib.h> 3 #include <linux/kernel.h> 4 #include "hist.h" 5 #include "c2c.h" 6 7 void c2c_fmt_free(struct perf_hpp_fmt *fmt) 8 { 9 struct c2c_fmt *c2c_fmt; 10 11 c2c_fmt = container_of(fmt, struct c2c_fmt, fmt); 12 free(c2c_fmt); 13 } 14 15 bool c2c_fmt_equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b) 16 { 17 struct c2c_fmt *c2c_a = container_of(a, struct c2c_fmt, fmt); 18 struct c2c_fmt *c2c_b = container_of(b, struct c2c_fmt, fmt); 19 20 return c2c_a->dim == c2c_b->dim; 21 } 22