File tree Expand file tree Collapse file tree 4 files changed +46
-17
lines changed Expand file tree Collapse file tree 4 files changed +46
-17
lines changed Original file line number Diff line number Diff line change @@ -870,8 +870,6 @@ int osnoise_hist_main(int argc, char *argv[])
870
870
}
871
871
}
872
872
873
- trace_instance_start (trace );
874
-
875
873
if (params -> trace_output ) {
876
874
record = osnoise_init_trace_tool ("osnoise" );
877
875
if (!record ) {
@@ -885,9 +883,19 @@ int osnoise_hist_main(int argc, char *argv[])
885
883
goto out_hist ;
886
884
}
887
885
888
- trace_instance_start (& record -> trace );
889
886
}
890
887
888
+ /*
889
+ * Start the tracer here, after having set all instances.
890
+ *
891
+ * Let the trace instance start first for the case of hitting a stop
892
+ * tracing while enabling other instances. The trace instance is the
893
+ * one with most valuable information.
894
+ */
895
+ if (params -> trace_output )
896
+ trace_instance_start (& record -> trace );
897
+ trace_instance_start (trace );
898
+
891
899
tool -> start_time = time (NULL );
892
900
osnoise_hist_set_signals (params );
893
901
Original file line number Diff line number Diff line change @@ -697,8 +697,6 @@ int osnoise_top_main(int argc, char **argv)
697
697
}
698
698
}
699
699
700
- trace_instance_start (trace );
701
-
702
700
if (params -> trace_output ) {
703
701
record = osnoise_init_trace_tool ("osnoise" );
704
702
if (!record ) {
@@ -711,9 +709,18 @@ int osnoise_top_main(int argc, char **argv)
711
709
if (retval )
712
710
goto out_top ;
713
711
}
712
+ }
714
713
714
+ /*
715
+ * Start the tracer here, after having set all instances.
716
+ *
717
+ * Let the trace instance start first for the case of hitting a stop
718
+ * tracing while enabling other instances. The trace instance is the
719
+ * one with most valuable information.
720
+ */
721
+ if (params -> trace_output )
715
722
trace_instance_start (& record -> trace );
716
- }
723
+ trace_instance_start ( trace );
717
724
718
725
tool -> start_time = time (NULL );
719
726
osnoise_top_set_signals (params );
Original file line number Diff line number Diff line change @@ -922,8 +922,6 @@ int timerlat_hist_main(int argc, char *argv[])
922
922
}
923
923
}
924
924
925
- trace_instance_start (trace );
926
-
927
925
if (params -> trace_output ) {
928
926
record = osnoise_init_trace_tool ("timerlat" );
929
927
if (!record ) {
@@ -936,8 +934,6 @@ int timerlat_hist_main(int argc, char *argv[])
936
934
if (retval )
937
935
goto out_hist ;
938
936
}
939
-
940
- trace_instance_start (& record -> trace );
941
937
}
942
938
943
939
if (!params -> no_aa ) {
@@ -956,9 +952,20 @@ int timerlat_hist_main(int argc, char *argv[])
956
952
err_msg ("Failed to enable timerlat tracer\n" );
957
953
goto out_hist ;
958
954
}
955
+ }
959
956
957
+ /*
958
+ * Start the tracers here, after having set all instances.
959
+ *
960
+ * Let the trace instance start first for the case of hitting a stop
961
+ * tracing while enabling other instances. The trace instance is the
962
+ * one with most valuable information.
963
+ */
964
+ if (params -> trace_output )
965
+ trace_instance_start (& record -> trace );
966
+ if (!params -> no_aa )
960
967
trace_instance_start (& aa -> trace );
961
- }
968
+ trace_instance_start ( trace );
962
969
963
970
tool -> start_time = time (NULL );
964
971
timerlat_hist_set_signals (params );
Original file line number Diff line number Diff line change @@ -743,8 +743,6 @@ int timerlat_top_main(int argc, char *argv[])
743
743
}
744
744
}
745
745
746
- trace_instance_start (trace );
747
-
748
746
if (params -> trace_output ) {
749
747
record = osnoise_init_trace_tool ("timerlat" );
750
748
if (!record ) {
@@ -757,8 +755,6 @@ int timerlat_top_main(int argc, char *argv[])
757
755
if (retval )
758
756
goto out_top ;
759
757
}
760
-
761
- trace_instance_start (& record -> trace );
762
758
}
763
759
764
760
if (!params -> no_aa ) {
@@ -785,11 +781,22 @@ int timerlat_top_main(int argc, char *argv[])
785
781
err_msg ("Failed to enable timerlat tracer\n" );
786
782
goto out_top ;
787
783
}
788
-
789
- trace_instance_start (& aa -> trace );
790
784
}
791
785
}
792
786
787
+ /*
788
+ * Start the tracers here, after having set all instances.
789
+ *
790
+ * Let the trace instance start first for the case of hitting a stop
791
+ * tracing while enabling other instances. The trace instance is the
792
+ * one with most valuable information.
793
+ */
794
+ if (params -> trace_output )
795
+ trace_instance_start (& record -> trace );
796
+ if (!params -> no_aa && aa != top )
797
+ trace_instance_start (& aa -> trace );
798
+ trace_instance_start (trace );
799
+
793
800
top -> start_time = time (NULL );
794
801
timerlat_top_set_signals (params );
795
802
You can’t perform that action at this time.
0 commit comments