It is often referred to as degradation or dissipation. Efficiency according to the second law or exergy efficiency as the name suggests computes the efficiency of a process raking the second law of thermodynamics into account.
Irreversibility: What is? (Thermodynamics)