Merge pull request #875 from robertbaldyga/pl-print-debug

Print pipeline steps only for debug
This commit is contained in:
Robert Baldyga 2025-04-02 15:29:40 +02:00 committed by GitHub
commit 6e1153660b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
/* /*
* Copyright(c) 2019-2022 Intel Corporation * Copyright(c) 2019-2022 Intel Corporation
* Copyright(c) 2023-2024 Huawei Technologies * Copyright(c) 2023-2025 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -10,6 +10,14 @@
#include "../ocf_request.h" #include "../ocf_request.h"
#include "utils_pipeline.h" #include "utils_pipeline.h"
#define OCF_PL_DEBUG 0
#if OCF_PL_DEBUG == 1
#define OCF_DEBUG_LOG(cache, format, ...) \
ocf_cache_log(cache, log_debug, format, ##__VA_ARGS__)
#else
#define OCF_DEBUG_LOG(cache, format, ...)
#endif
#define OCF_PIPELINE_ALIGNMENT 64 #define OCF_PIPELINE_ALIGNMENT 64
struct ocf_pipeline { struct ocf_pipeline {
@ -37,7 +45,7 @@ static int _ocf_pipeline_run_step(struct ocf_request *req)
while (true) { while (true) {
step = &pipeline->properties->steps[pipeline->next_step]; step = &pipeline->properties->steps[pipeline->next_step];
ocf_cache_log(req->cache, log_debug, "PL STEP: %s\n", step->name); OCF_DEBUG_LOG(req->cache, "PL STEP: %s\n", step->name);
switch (step->type) { switch (step->type) {
case ocf_pipeline_step_single: case ocf_pipeline_step_single:
pipeline->next_step++; pipeline->next_step++;