Files
linux-nv-oot/drivers/platform/tegra/dce/include/dce-debug-perf.h
Mahesh Kumar 873e421d95 platform: dce: Add Debugfs support for Perf
Add debugfs nodes
 - start/stop perf stats.
 - read perf stat stats
 - set the format type as csv or xml

Add debugfs to capture perf events
 - Can enable specific perf events
through debugfs node.

Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Change-Id: I0a7833d7a8f04296ba3806f4f2a218175080d2e2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765513
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 19:36:09 +00:00

43 lines
1.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. 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 DCE_DEBUG_PERF_H
#define DCE_DEBUG_PERF_H
#include <linux/debugfs.h>
#include <linux/uaccess.h>
int dbg_dce_perf_stats_stats_fops_open(struct inode *inode,
struct file *file);
ssize_t dbg_dce_perf_stats_stats_fops_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos);
int dbg_dce_perf_stats_help_fops_open(struct inode *inode,
struct file *file);
ssize_t dbg_dce_perf_format_fops_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos);
int dbg_dce_perf_format_fops_open(struct inode *inode, struct file *file);
int dbg_dce_perf_events_events_fops_open(struct inode *inode,
struct file *file);
ssize_t dbg_dce_perf_events_events_fops_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos);
int dbg_dce_perf_events_help_fops_open(struct inode *inode,
struct file *file);
#endif