cregit-Linux how code gets into the kernel

Release 4.13 tools/perf/util/namespaces.c

Directory: tools/perf/util
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, version 2, as
 * published by the Free Software Foundation.
 *
 * Copyright (C) 2017 Hari Bathini, IBM Corporation
 */

#include "namespaces.h"
#include "util.h"
#include "event.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>


struct namespaces *namespaces__new(struct namespaces_event *event) { struct namespaces *namespaces; u64 link_info_size = ((event ? event->nr_namespaces : NR_NAMESPACES) * sizeof(struct perf_ns_link_info)); namespaces = zalloc(sizeof(struct namespaces) + link_info_size); if (!namespaces) return NULL; namespaces->end_time = -1; if (event) memcpy(namespaces->link_info, event->link_info, link_info_size); return namespaces; }

Contributors

PersonTokensPropCommitsCommitProp
Hari Bathini86100.00%1100.00%
Total86100.00%1100.00%


void namespaces__free(struct namespaces *namespaces) { free(namespaces); }

Contributors

PersonTokensPropCommitsCommitProp
Hari Bathini15100.00%1100.00%
Total15100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Hari Bathini11797.50%150.00%
Arnaldo Carvalho de Melo32.50%150.00%
Total120100.00%2100.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.