46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
|
/*
|
||
|
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify it
|
||
|
* under the terms and conditions of the GNU General Public License,
|
||
|
* version 2, as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||
|
* more details.
|
||
|
*/
|
||
|
|
||
|
#ifndef __VIDEO_TEGRA_NVMAP_STATS_H
|
||
|
#define __VIDEO_TEGRA_NVMAP_STATS_H
|
||
|
|
||
|
enum nvmap_stats_t {
|
||
|
NS_ALLOC = 0,
|
||
|
NS_RELEASE,
|
||
|
NS_UALLOC,
|
||
|
NS_URELEASE,
|
||
|
NS_KALLOC,
|
||
|
NS_KRELEASE,
|
||
|
NS_CFLUSH_RQ,
|
||
|
NS_CFLUSH_DONE,
|
||
|
NS_UCFLUSH_RQ,
|
||
|
NS_UCFLUSH_DONE,
|
||
|
NS_KCFLUSH_RQ,
|
||
|
NS_KCFLUSH_DONE,
|
||
|
NS_TOTAL,
|
||
|
NS_NUM,
|
||
|
};
|
||
|
|
||
|
struct nvmap_stats {
|
||
|
atomic64_t stats[NS_NUM];
|
||
|
atomic64_t collect;
|
||
|
};
|
||
|
|
||
|
extern struct nvmap_stats nvmap_stats;
|
||
|
|
||
|
void nvmap_stats_init(struct dentry *nvmap_debug_root);
|
||
|
void nvmap_stats_inc(enum nvmap_stats_t, size_t size);
|
||
|
void nvmap_stats_dec(enum nvmap_stats_t, size_t size);
|
||
|
u64 nvmap_stats_read(enum nvmap_stats_t);
|
||
|
#endif /* __VIDEO_TEGRA_NVMAP_STATS_H */
|