3 * (C) COPYRIGHT 2012-2015 ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
10 * A copy of the licence is included with the program, and can also be obtained
11 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12 * Boston, MA 02110-1301, USA.
21 * @file mali_kbase_mem_profile_debugfs.h
22 * Header file for mem profiles entries in debugfs
26 #ifndef _KBASE_MEM_PROFILE_DEBUGFS_H
27 #define _KBASE_MEM_PROFILE_DEBUGFS_H
29 #include <mali_kbase.h>
30 #include <linux/debugfs.h>
31 #include <linux/seq_file.h>
34 * @brief Remove entry from Mali memory profile debugfs
36 void kbasep_mem_profile_debugfs_remove(struct kbase_context *kctx);
39 * @brief Insert @p data to the debugfs file so it can be read by userspace
41 * The function takes ownership of @p data and frees it later when new data
44 * If the debugfs entry corresponding to the @p kctx doesn't exist,
45 * an attempt will be made to create it.
47 * @param kctx The context whose debugfs file @p data should be inserted to
48 * @param data A NULL-terminated string to be inserted to the debugfs file,
49 * without the trailing new line character
50 * @param size The length of the @p data string
51 * @return 0 if @p data inserted correctly
52 * -EAGAIN in case of error
53 * @post @ref mem_profile_initialized will be set to @c true
54 * the first time this function succeeds.
56 int kbasep_mem_profile_debugfs_insert(struct kbase_context *kctx, char *data,
59 #endif /*_KBASE_MEM_PROFILE_DEBUGFS_H*/