devfreq: wmark: active: add trace log

Add trace log to print load and frequency.

Bug 200493763
Bug 200494025

Change-Id: Ieb1b28c4546230dbdefd14f11e07a92dd91eb702
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2673488
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Johnny Liu
2022-02-22 14:34:43 +08:00
committed by Laxman Dewangan
parent abc0d9c44d
commit 97ff547e3c

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -25,6 +25,9 @@
#include "governor.h" #include "governor.h"
#define CREATE_TRACE_POINTS
#include <trace/events/watermark_gov.h>
struct wmark_gov_param { struct wmark_gov_param {
unsigned int block_window; unsigned int block_window;
unsigned int load_target; unsigned int load_target;
@@ -167,6 +170,7 @@ static int devfreq_watermark_target_freq(struct devfreq *df,
unsigned long *freq) unsigned long *freq)
{ {
struct wmark_gov_info *wmarkinfo = df->data; struct wmark_gov_info *wmarkinfo = df->data;
struct platform_device *pdev = wmarkinfo->pdev;
struct devfreq_dev_status dev_stat; struct devfreq_dev_status dev_stat;
unsigned long long load, relation, ideal_freq; unsigned long long load, relation, ideal_freq;
ktime_t current_time = ktime_get(); ktime_t current_time = ktime_get();
@@ -226,6 +230,7 @@ static int devfreq_watermark_target_freq(struct devfreq *df,
/* update the frequency */ /* update the frequency */
*freq = freqlist_round(wmarkinfo, wmarkinfo->average_target_freq); *freq = freqlist_round(wmarkinfo, wmarkinfo->average_target_freq);
trace_devfreq_watermark_target_freq(pdev->name, load, *freq);
/* check if frequency actually got updated */ /* check if frequency actually got updated */
if (*freq == dev_stat.current_frequency) if (*freq == dev_stat.current_frequency)