]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - tools/perf/builtin-record.c
Merge tag 'for-linus-20140716' of git://git.infradead.org/linux-mtd
[karo-tx-linux.git] / tools / perf / builtin-record.c
index e4c85b8f46c29fd7526e0bea3ef419ba7884acd3..378b85b731a72fede65d41318107272649edfbe5 100644 (file)
@@ -454,7 +454,11 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
                        if (done)
                                break;
                        err = poll(rec->evlist->pollfd, rec->evlist->nr_fds, -1);
-                       if (err < 0 && errno == EINTR)
+                       /*
+                        * Propagate error, only if there's any. Ignore positive
+                        * number of returned events and interrupt error.
+                        */
+                       if (err > 0 || (err < 0 && errno == EINTR))
                                err = 0;
                        waking++;
                }
@@ -544,6 +548,7 @@ static const struct branch_mode branch_modes[] = {
        BRANCH_OPT("abort_tx", PERF_SAMPLE_BRANCH_ABORT_TX),
        BRANCH_OPT("in_tx", PERF_SAMPLE_BRANCH_IN_TX),
        BRANCH_OPT("no_tx", PERF_SAMPLE_BRANCH_NO_TX),
+       BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND),
        BRANCH_END
 };