diff options
-rw-r--r-- | trace-record.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/trace-record.c b/trace-record.c index d73d37d..9343822 100644 --- a/trace-record.c +++ b/trace-record.c | |||
@@ -1794,6 +1794,21 @@ void set_buffer_size(void) | |||
1794 | close(fd); | 1794 | close(fd); |
1795 | } | 1795 | } |
1796 | 1796 | ||
1797 | static void record_all_events(void) | ||
1798 | { | ||
1799 | struct tracecmd_event_list *list; | ||
1800 | |||
1801 | while (listed_events) { | ||
1802 | list = listed_events; | ||
1803 | listed_events = list->next; | ||
1804 | free(list); | ||
1805 | } | ||
1806 | list = malloc_or_die(sizeof(*list)); | ||
1807 | list->next = NULL; | ||
1808 | list->glob = "*/*"; | ||
1809 | listed_events = list; | ||
1810 | } | ||
1811 | |||
1797 | void trace_record (int argc, char **argv) | 1812 | void trace_record (int argc, char **argv) |
1798 | { | 1813 | { |
1799 | const char *plugin = NULL; | 1814 | const char *plugin = NULL; |
@@ -1862,15 +1877,7 @@ void trace_record (int argc, char **argv) | |||
1862 | break; | 1877 | break; |
1863 | case 'a': | 1878 | case 'a': |
1864 | record_all = 1; | 1879 | record_all = 1; |
1865 | while (listed_events) { | 1880 | record_all_events(); |
1866 | list = listed_events; | ||
1867 | listed_events = list->next; | ||
1868 | free(list); | ||
1869 | } | ||
1870 | list = malloc_or_die(sizeof(*list)); | ||
1871 | list->next = NULL; | ||
1872 | list->glob = "*/*"; | ||
1873 | listed_events = list; | ||
1874 | 1881 | ||
1875 | break; | 1882 | break; |
1876 | case 'e': | 1883 | case 'e': |
@@ -2030,6 +2037,10 @@ void trace_record (int argc, char **argv) | |||
2030 | 2037 | ||
2031 | tracing_on_init_val = read_tracing_on(); | 2038 | tracing_on_init_val = read_tracing_on(); |
2032 | 2039 | ||
2040 | /* Extracting data records all events in the system. */ | ||
2041 | if (extract) | ||
2042 | record_all_events(); | ||
2043 | |||
2033 | if (event_selection) | 2044 | if (event_selection) |
2034 | expand_event_list(); | 2045 | expand_event_list(); |
2035 | 2046 | ||