parse-events.c (ce9036a6e3bdfac6c7ccf8221aec9bcf9c2d355e) | parse-events.c (6484d2f9dc3ecbf13f07100f7f771d1d779eda04) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/hw_breakpoint.h> 3#include <linux/err.h> 4#include <linux/zalloc.h> 5#include <dirent.h> 6#include <errno.h> 7#include <sys/ioctl.h> 8#include <sys/types.h> --- 1895 unchanged lines hidden (view full) --- 1904 return ret; 1905} 1906 1907int parse_events(struct evlist *evlist, const char *str, 1908 struct parse_events_error *err) 1909{ 1910 struct parse_events_state parse_state = { 1911 .list = LIST_HEAD_INIT(parse_state.list), | 1// SPDX-License-Identifier: GPL-2.0 2#include <linux/hw_breakpoint.h> 3#include <linux/err.h> 4#include <linux/zalloc.h> 5#include <dirent.h> 6#include <errno.h> 7#include <sys/ioctl.h> 8#include <sys/types.h> --- 1895 unchanged lines hidden (view full) --- 1904 return ret; 1905} 1906 1907int parse_events(struct evlist *evlist, const char *str, 1908 struct parse_events_error *err) 1909{ 1910 struct parse_events_state parse_state = { 1911 .list = LIST_HEAD_INIT(parse_state.list), |
1912 .idx = evlist->nr_entries, | 1912 .idx = evlist->core.nr_entries, |
1913 .error = err, 1914 .evlist = evlist, 1915 }; 1916 int ret; 1917 1918 ret = parse_events__scanner(str, &parse_state, PE_START_EVENTS); 1919 perf_pmu__parse_cleanup(); 1920 if (!ret) { --- 114 unchanged lines hidden (view full) --- 2035 int err; 2036 2037 /* 2038 * Don't return when list_empty, give func a chance to report 2039 * error when it found last == NULL. 2040 * 2041 * So no need to WARN here, let *func do this. 2042 */ | 1913 .error = err, 1914 .evlist = evlist, 1915 }; 1916 int ret; 1917 1918 ret = parse_events__scanner(str, &parse_state, PE_START_EVENTS); 1919 perf_pmu__parse_cleanup(); 1920 if (!ret) { --- 114 unchanged lines hidden (view full) --- 2035 int err; 2036 2037 /* 2038 * Don't return when list_empty, give func a chance to report 2039 * error when it found last == NULL. 2040 * 2041 * So no need to WARN here, let *func do this. 2042 */ |
2043 if (evlist->nr_entries > 0) | 2043 if (evlist->core.nr_entries > 0) |
2044 last = perf_evlist__last(evlist); 2045 2046 do { 2047 err = (*func)(last, arg); 2048 if (err) 2049 return -1; 2050 if (!last) 2051 return 0; --- 800 unchanged lines hidden --- | 2044 last = perf_evlist__last(evlist); 2045 2046 do { 2047 err = (*func)(last, arg); 2048 if (err) 2049 return -1; 2050 if (!last) 2051 return 0; --- 800 unchanged lines hidden --- |