diff options
| author | Namhyung Kim <namhyung.kim@lge.com> | 2012-09-24 04:15:01 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-24 10:47:09 -0400 |
| commit | 3d7eb86b9d84e7493c8c835fbcd2a3fe4a1f5937 (patch) | |
| tree | 2dba03e469cf97e99370694de8dcb131e84c5710 /tools | |
| parent | 7e94cfcc9d201984a7be00a4fb42050c69ec4c56 (diff) | |
perf header: Remove unused @feat arg from ->process callback
As the @feat arg is not used anywhere, get rid of it from the signature.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1348474503-15070-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/util/header.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index b2929d7a3d4e..4b028df83a40 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
| @@ -1580,18 +1580,16 @@ out: | |||
| 1580 | return err; | 1580 | return err; |
| 1581 | } | 1581 | } |
| 1582 | 1582 | ||
| 1583 | static int process_tracing_data(struct perf_file_section *section | 1583 | static int process_tracing_data(struct perf_file_section *section __maybe_unused, |
| 1584 | __maybe_unused, | 1584 | struct perf_header *ph __maybe_unused, |
| 1585 | struct perf_header *ph __maybe_unused, | 1585 | int fd, void *data) |
| 1586 | int feat __maybe_unused, int fd, void *data) | ||
| 1587 | { | 1586 | { |
| 1588 | trace_report(fd, data, false); | 1587 | trace_report(fd, data, false); |
| 1589 | return 0; | 1588 | return 0; |
| 1590 | } | 1589 | } |
| 1591 | 1590 | ||
| 1592 | static int process_build_id(struct perf_file_section *section, | 1591 | static int process_build_id(struct perf_file_section *section, |
| 1593 | struct perf_header *ph, | 1592 | struct perf_header *ph, int fd, |
| 1594 | int feat __maybe_unused, int fd, | ||
| 1595 | void *data __maybe_unused) | 1593 | void *data __maybe_unused) |
| 1596 | { | 1594 | { |
| 1597 | if (perf_header__read_build_ids(ph, fd, section->offset, section->size)) | 1595 | if (perf_header__read_build_ids(ph, fd, section->offset, section->size)) |
| @@ -1600,40 +1598,40 @@ static int process_build_id(struct perf_file_section *section, | |||
| 1600 | } | 1598 | } |
| 1601 | 1599 | ||
| 1602 | static int process_hostname(struct perf_file_section *section __maybe_unused, | 1600 | static int process_hostname(struct perf_file_section *section __maybe_unused, |
| 1603 | struct perf_header *ph, int feat __maybe_unused, | 1601 | struct perf_header *ph, int fd, |
| 1604 | int fd, void *data __maybe_unused) | 1602 | void *data __maybe_unused) |
| 1605 | { | 1603 | { |
| 1606 | ph->env.hostname = do_read_string(fd, ph); | 1604 | ph->env.hostname = do_read_string(fd, ph); |
| 1607 | return ph->env.hostname ? 0 : -ENOMEM; | 1605 | return ph->env.hostname ? 0 : -ENOMEM; |
| 1608 | } | 1606 | } |
| 1609 | 1607 | ||
| 1610 | static int process_osrelease(struct perf_file_section *section __maybe_unused, | 1608 | static int process_osrelease(struct perf_file_section *section __maybe_unused, |
| 1611 | struct perf_header *ph, int feat __maybe_unused, | 1609 | struct perf_header *ph, int fd, |
| 1612 | int fd, void *data __maybe_unused) | 1610 | void *data __maybe_unused) |
| 1613 | { | 1611 | { |
| 1614 | ph->env.os_release = do_read_string(fd, ph); | 1612 | ph->env.os_release = do_read_string(fd, ph); |
| 1615 | return ph->env.os_release ? 0 : -ENOMEM; | 1613 | return ph->env.os_release ? 0 : -ENOMEM; |
| 1616 | } | 1614 | } |
| 1617 | 1615 | ||
| 1618 | static int process_version(struct perf_file_section *section __maybe_unused, | 1616 | static int process_version(struct perf_file_section *section __maybe_unused, |
| 1619 | struct perf_header *ph, int feat __maybe_unused, | 1617 | struct perf_header *ph, int fd, |
| 1620 | int fd, void *data __maybe_unused) | 1618 | void *data __maybe_unused) |
| 1621 | { | 1619 | { |
| 1622 | ph->env.version = do_read_string(fd, ph); | 1620 | ph->env.version = do_read_string(fd, ph); |
| 1623 | return ph->env.version ? 0 : -ENOMEM; | 1621 | return ph->env.version ? 0 : -ENOMEM; |
| 1624 | } | 1622 | } |
| 1625 | 1623 | ||
| 1626 | static int process_arch(struct perf_file_section *section __maybe_unused, | 1624 | static int process_arch(struct perf_file_section *section __maybe_unused, |
| 1627 | struct perf_header *ph, int feat __maybe_unused, | 1625 | struct perf_header *ph, int fd, |
| 1628 | int fd, void *data __maybe_unused) | 1626 | void *data __maybe_unused) |
| 1629 | { | 1627 | { |
| 1630 | ph->env.arch = do_read_string(fd, ph); | 1628 | ph->env.arch = do_read_string(fd, ph); |
| 1631 | return ph->env.arch ? 0 : -ENOMEM; | 1629 | return ph->env.arch ? 0 : -ENOMEM; |
| 1632 | } | 1630 | } |
| 1633 | 1631 | ||
| 1634 | static int process_nrcpus(struct perf_file_section *section __maybe_unused, | 1632 | static int process_nrcpus(struct perf_file_section *section __maybe_unused, |
| 1635 | struct perf_header *ph, int feat __maybe_unused, | 1633 | struct perf_header *ph, int fd, |
| 1636 | int fd, void *data __maybe_unused) | 1634 | void *data __maybe_unused) |
| 1637 | { | 1635 | { |
| 1638 | size_t ret; | 1636 | size_t ret; |
| 1639 | u32 nr; | 1637 | u32 nr; |
| @@ -1659,24 +1657,24 @@ static int process_nrcpus(struct perf_file_section *section __maybe_unused, | |||
| 1659 | } | 1657 | } |
| 1660 | 1658 | ||
| 1661 | static int process_cpudesc(struct perf_file_section *section __maybe_unused, | 1659 | static int process_cpudesc(struct perf_file_section *section __maybe_unused, |
| 1662 | struct perf_header *ph, int feat __maybe_unused, | 1660 | struct perf_header *ph, int fd, |
| 1663 | int fd, void *data __maybe_unused) | 1661 | void *data __maybe_unused) |
| 1664 | { | 1662 | { |
| 1665 | ph->env.cpu_desc = do_read_string(fd, ph); | 1663 | ph->env.cpu_desc = do_read_string(fd, ph); |
| 1666 | return ph->env.cpu_desc ? 0 : -ENOMEM; | 1664 | return ph->env.cpu_desc ? 0 : -ENOMEM; |
| 1667 | } | 1665 | } |
| 1668 | 1666 | ||
| 1669 | static int process_cpuid(struct perf_file_section *section __maybe_unused, | 1667 | static int process_cpuid(struct perf_file_section *section __maybe_unused, |
| 1670 | struct perf_header *ph, int feat __maybe_unused, | 1668 | struct perf_header *ph, int fd, |
| 1671 | int fd, void *data __maybe_unused) | 1669 | void *data __maybe_unused) |
| 1672 | { | 1670 | { |
| 1673 | ph->env.cpuid = do_read_string(fd, ph); | 1671 | ph->env.cpuid = do_read_string(fd, ph); |
| 1674 | return ph->env.cpuid ? 0 : -ENOMEM; | 1672 | return ph->env.cpuid ? 0 : -ENOMEM; |
| 1675 | } | 1673 | } |
| 1676 | 1674 | ||
| 1677 | static int process_total_mem(struct perf_file_section *section __maybe_unused, | 1675 | static int process_total_mem(struct perf_file_section *section __maybe_unused, |
| 1678 | struct perf_header *ph, int feat __maybe_unused, | 1676 | struct perf_header *ph, int fd, |
| 1679 | int fd, void *data __maybe_unused) | 1677 | void *data __maybe_unused) |
| 1680 | { | 1678 | { |
| 1681 | uint64_t mem; | 1679 | uint64_t mem; |
| 1682 | size_t ret; | 1680 | size_t ret; |
| @@ -1711,7 +1709,8 @@ perf_evlist__find_by_index(struct perf_evlist *evlist, int idx) | |||
| 1711 | } | 1709 | } |
| 1712 | 1710 | ||
| 1713 | static void | 1711 | static void |
| 1714 | perf_evlist__set_event_name(struct perf_evlist *evlist, struct perf_evsel *event) | 1712 | perf_evlist__set_event_name(struct perf_evlist *evlist, |
| 1713 | struct perf_evsel *event) | ||
| 1715 | { | 1714 | { |
| 1716 | struct perf_evsel *evsel; | 1715 | struct perf_evsel *evsel; |
| 1717 | 1716 | ||
| @@ -1730,15 +1729,16 @@ perf_evlist__set_event_name(struct perf_evlist *evlist, struct perf_evsel *event | |||
| 1730 | 1729 | ||
| 1731 | static int | 1730 | static int |
| 1732 | process_event_desc(struct perf_file_section *section __maybe_unused, | 1731 | process_event_desc(struct perf_file_section *section __maybe_unused, |
| 1733 | struct perf_header *header, int feat __maybe_unused, int fd, | 1732 | struct perf_header *header, int fd, |
| 1734 | void *data __maybe_unused) | 1733 | void *data __maybe_unused) |
| 1735 | { | 1734 | { |
| 1736 | struct perf_session *session = container_of(header, struct perf_session, header); | 1735 | struct perf_session *session; |
| 1737 | struct perf_evsel *evsel, *events = read_event_desc(header, fd); | 1736 | struct perf_evsel *evsel, *events = read_event_desc(header, fd); |
| 1738 | 1737 | ||
| 1739 | if (!events) | 1738 | if (!events) |
| 1740 | return 0; | 1739 | return 0; |
| 1741 | 1740 | ||
| 1741 | session = container_of(header, struct perf_session, header); | ||
| 1742 | for (evsel = events; evsel->attr.size; evsel++) | 1742 | for (evsel = events; evsel->attr.size; evsel++) |
| 1743 | perf_evlist__set_event_name(session->evlist, evsel); | 1743 | perf_evlist__set_event_name(session->evlist, evsel); |
| 1744 | 1744 | ||
| @@ -1748,8 +1748,8 @@ process_event_desc(struct perf_file_section *section __maybe_unused, | |||
| 1748 | } | 1748 | } |
| 1749 | 1749 | ||
| 1750 | static int process_cmdline(struct perf_file_section *section __maybe_unused, | 1750 | static int process_cmdline(struct perf_file_section *section __maybe_unused, |
| 1751 | struct perf_header *ph, int feat __maybe_unused, | 1751 | struct perf_header *ph, int fd, |
| 1752 | int fd, void *data __maybe_unused) | 1752 | void *data __maybe_unused) |
| 1753 | { | 1753 | { |
| 1754 | size_t ret; | 1754 | size_t ret; |
| 1755 | char *str; | 1755 | char *str; |
| @@ -1784,8 +1784,8 @@ error: | |||
| 1784 | } | 1784 | } |
| 1785 | 1785 | ||
| 1786 | static int process_cpu_topology(struct perf_file_section *section __maybe_unused, | 1786 | static int process_cpu_topology(struct perf_file_section *section __maybe_unused, |
| 1787 | struct perf_header *ph, int feat __maybe_unused, | 1787 | struct perf_header *ph, int fd, |
| 1788 | int fd, void *data __maybe_unused) | 1788 | void *data __maybe_unused) |
| 1789 | { | 1789 | { |
| 1790 | size_t ret; | 1790 | size_t ret; |
| 1791 | u32 nr, i; | 1791 | u32 nr, i; |
| @@ -1840,8 +1840,8 @@ error: | |||
| 1840 | } | 1840 | } |
| 1841 | 1841 | ||
| 1842 | static int process_numa_topology(struct perf_file_section *section __maybe_unused, | 1842 | static int process_numa_topology(struct perf_file_section *section __maybe_unused, |
| 1843 | struct perf_header *ph, int feat __maybe_unused, | 1843 | struct perf_header *ph, int fd, |
| 1844 | int fd, void *data __maybe_unused) | 1844 | void *data __maybe_unused) |
| 1845 | { | 1845 | { |
| 1846 | size_t ret; | 1846 | size_t ret; |
| 1847 | u32 nr, node, i; | 1847 | u32 nr, node, i; |
| @@ -1900,8 +1900,8 @@ error: | |||
| 1900 | } | 1900 | } |
| 1901 | 1901 | ||
| 1902 | static int process_pmu_mappings(struct perf_file_section *section __maybe_unused, | 1902 | static int process_pmu_mappings(struct perf_file_section *section __maybe_unused, |
| 1903 | struct perf_header *ph, int feat __maybe_unused, | 1903 | struct perf_header *ph, int fd, |
| 1904 | int fd, void *data __maybe_unused) | 1904 | void *data __maybe_unused) |
| 1905 | { | 1905 | { |
| 1906 | size_t ret; | 1906 | size_t ret; |
| 1907 | char *name; | 1907 | char *name; |
| @@ -1954,7 +1954,7 @@ struct feature_ops { | |||
| 1954 | void (*print)(struct perf_header *h, int fd, FILE *fp); | 1954 | void (*print)(struct perf_header *h, int fd, FILE *fp); |
| 1955 | char *(*read)(struct perf_header *h, int fd); | 1955 | char *(*read)(struct perf_header *h, int fd); |
| 1956 | int (*process)(struct perf_file_section *section, | 1956 | int (*process)(struct perf_file_section *section, |
| 1957 | struct perf_header *h, int feat, int fd, void *data); | 1957 | struct perf_header *h, int fd, void *data); |
| 1958 | const char *name; | 1958 | const char *name; |
| 1959 | bool full_only; | 1959 | bool full_only; |
| 1960 | }; | 1960 | }; |
| @@ -2520,7 +2520,7 @@ static int perf_file_section__process(struct perf_file_section *section, | |||
| 2520 | if (!feat_ops[feat].process) | 2520 | if (!feat_ops[feat].process) |
| 2521 | return 0; | 2521 | return 0; |
| 2522 | 2522 | ||
| 2523 | return feat_ops[feat].process(section, ph, feat, fd, data); | 2523 | return feat_ops[feat].process(section, ph, fd, data); |
| 2524 | } | 2524 | } |
| 2525 | 2525 | ||
| 2526 | static int perf_file_header__read_pipe(struct perf_pipe_file_header *header, | 2526 | static int perf_file_header__read_pipe(struct perf_pipe_file_header *header, |
