Commit bd700ba
committed
thermal/debugfs: Avoid printing zero duration for mitigation events in progress
If a thermal mitigation event is in progress, its duration value has
not been updated yet, so 0 will be printed as the event duration by
tze_seq_show() which is confusing.
Avoid doing that by marking the beginning of the event with the
KTIME_MIN duration value and making tze_seq_show() compute the current
event duration on the fly, in which case '>' will be printed instead of
'=' in the event duration value field.
Similarly, for trip points that have been crossed on the down, mark
the end of mitigation with the KTIME_MAX timestamp value and make
tze_seq_show() compute the current duration on the fly for the trip
points still involved in the mitigation, in which cases the duration
value printed by it will be prepended with a '>' character.
Fixes: 7ef01f2 ("thermal/debugfs: Add thermal debugfs information for mitigation episodes")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>1 parent 31a0fa0 commit bd700ba
1 file changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| 559 | + | |
559 | 560 | | |
560 | 561 | | |
561 | 562 | | |
| |||
691 | 692 | | |
692 | 693 | | |
693 | 694 | | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
694 | 698 | | |
695 | 699 | | |
696 | 700 | | |
| |||
766 | 770 | | |
767 | 771 | | |
768 | 772 | | |
| 773 | + | |
769 | 774 | | |
| 775 | + | |
770 | 776 | | |
771 | 777 | | |
772 | 778 | | |
773 | | - | |
774 | | - | |
775 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
776 | 790 | | |
777 | | - | |
| 791 | + | |
778 | 792 | | |
779 | 793 | | |
780 | 794 | | |
| |||
806 | 820 | | |
807 | 821 | | |
808 | 822 | | |
809 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
810 | 837 | | |
811 | 838 | | |
812 | 839 | | |
813 | 840 | | |
814 | | - | |
| 841 | + | |
815 | 842 | | |
816 | 843 | | |
817 | 844 | | |
| |||
0 commit comments