cregit-Linux how code gets into the kernel

Release 4.14 tools/perf/util/xyarray.c

Directory: tools/perf/util
// SPDX-License-Identifier: GPL-2.0
#include "xyarray.h"
#include "util.h"
#include <stdlib.h>
#include <string.h>


struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size) { size_t row_size = ylen * entry_size; struct xyarray *xy = zalloc(sizeof(*xy) + xlen * row_size); if (xy != NULL) { xy->entry_size = entry_size; xy->row_size = row_size; xy->entries = xlen * ylen; xy->max_x = xlen; xy->max_y = ylen; } return xy; }

Contributors

PersonTokensPropCommitsCommitProp
Arnaldo Carvalho de Melo6476.19%133.33%
Andi Kleen1214.29%133.33%
Jiri Olsa89.52%133.33%
Total84100.00%3100.00%


void xyarray__reset(struct xyarray *xy) { size_t n = xy->entries * xy->entry_size; memset(xy->contents, 0, n); }

Contributors

PersonTokensPropCommitsCommitProp
Jiri Olsa32100.00%1100.00%
Total32100.00%1100.00%


void xyarray__delete(struct xyarray *xy) { free(xy); }

Contributors

PersonTokensPropCommitsCommitProp
Arnaldo Carvalho de Melo15100.00%1100.00%
Total15100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Arnaldo Carvalho de Melo9163.19%240.00%
Jiri Olsa4027.78%120.00%
Andi Kleen128.33%120.00%
Greg Kroah-Hartman10.69%120.00%
Total144100.00%5100.00%
Directory: tools/perf/util
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.