File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1868,12 +1868,12 @@ static void *perf_evlist__poll_thread(void *arg)
18681868{
18691869 struct perf_evlist * evlist = arg ;
18701870 bool draining = false;
1871- int i ;
1871+ int i , done = 0 ;
1872+
1873+ while (!done ) {
1874+ bool got_data = false;
18721875
1873- while (draining || !(evlist -> thread .done )) {
1874- if (draining )
1875- draining = false;
1876- else if (evlist -> thread .done )
1876+ if (evlist -> thread .done )
18771877 draining = true;
18781878
18791879 if (!draining )
@@ -1894,9 +1894,13 @@ static void *perf_evlist__poll_thread(void *arg)
18941894 pr_warning ("cannot locate proper evsel for the side band event\n" );
18951895
18961896 perf_mmap__consume (map );
1897+ got_data = true;
18971898 }
18981899 perf_mmap__read_done (map );
18991900 }
1901+
1902+ if (draining && !got_data )
1903+ break ;
19001904 }
19011905 return NULL ;
19021906}
You can’t perform that action at this time.
0 commit comments