mirror of
https://github.com/torvalds/linux.git
synced 2026-04-28 03:22:27 -04:00
It helpful to clear GT stats, run a test cases which is being profiled, and look at the results of the stats from the individual test case. Make stats entry writable and upon write clear the stats. v5: - Drop clear_stats debugfs entry (Lucas) v6: - Use xe_gt_stats_clear rather than helper (Michal) - Rework loop in xe_gt_stats_clear (Michal) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://lore.kernel.org/r/20250829172232.1308004-2-matthew.brost@intel.com
27 lines
535 B
C
27 lines
535 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2024 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GT_STATS_H_
|
|
#define _XE_GT_STATS_H_
|
|
|
|
#include "xe_gt_stats_types.h"
|
|
|
|
struct xe_gt;
|
|
struct drm_printer;
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
int xe_gt_stats_print_info(struct xe_gt *gt, struct drm_printer *p);
|
|
void xe_gt_stats_clear(struct xe_gt *gt);
|
|
void xe_gt_stats_incr(struct xe_gt *gt, const enum xe_gt_stats_id id, int incr);
|
|
#else
|
|
static inline void
|
|
xe_gt_stats_incr(struct xe_gt *gt, const enum xe_gt_stats_id id,
|
|
int incr)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
#endif
|