mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 12:24:18 +00:00
This patch adds early checks to avoid burning CPU cycles on the assembly of trace entries which would be skipped anyway. Introduce a static const variable to keep the trace level to check with debug_level_enabled() in sync with the actual trace emit with debug_event(). In order not to refactor the SAN tracing too much, simply use a define instead. This change is only for the non / semi hot paths, while the actual (I/O) hot path was already improved earlier: zfcp_dbf_scsi() is already guarded by its only caller _zfcp_dbf_scsi() since commitdcd20e2316("[SCSI] zfcp: Only collect SCSI debug data for matching trace levels"). zfcp_dbf_hba_fsf_res() is already guarded by its only caller zfcp_dbf_hba_fsf_response() since commit2e261af84c("[SCSI] zfcp: Only collect FSF/HBA debug data for matching trace levels"). Signed-off-by: Martin Peschke <[email protected]> [[email protected]: rebase, reword, default level 3 branch prediction] Signed-off-by: Steffen Maier <[email protected]> Reviewed-by: Benjamin Block <[email protected]> Signed-off-by: Benjamin Block <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>