diff options
| author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2016-05-02 21:30:04 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2016-05-02 21:30:04 -0400 |
| commit | dcb0b5575d24a32f51a3f1003312fb94ed4e214a (patch) | |
| tree | 07c58cf96f570a789696cb0d1c9e7eb7959d5597 | |
| parent | 904d1857ad09b43f514897dd42daffe200d1ca50 (diff) | |
tracing: Remove TRACE_EVENT_FL_USE_CALL_FILTER logic
Nothing sets TRACE_EVENT_FL_USE_CALL_FILTER anymore. Remove it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | include/linux/trace_events.h | 3 | ||||
| -rw-r--r-- | kernel/trace/trace_events_filter.c | 71 |
2 files changed, 10 insertions, 64 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 3111a1efdad6..ba6456302e34 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h | |||
| @@ -214,7 +214,6 @@ enum { | |||
| 214 | TRACE_EVENT_FL_NO_SET_FILTER_BIT, | 214 | TRACE_EVENT_FL_NO_SET_FILTER_BIT, |
| 215 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, | 215 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, |
| 216 | TRACE_EVENT_FL_WAS_ENABLED_BIT, | 216 | TRACE_EVENT_FL_WAS_ENABLED_BIT, |
| 217 | TRACE_EVENT_FL_USE_CALL_FILTER_BIT, | ||
| 218 | TRACE_EVENT_FL_TRACEPOINT_BIT, | 217 | TRACE_EVENT_FL_TRACEPOINT_BIT, |
| 219 | TRACE_EVENT_FL_KPROBE_BIT, | 218 | TRACE_EVENT_FL_KPROBE_BIT, |
| 220 | TRACE_EVENT_FL_UPROBE_BIT, | 219 | TRACE_EVENT_FL_UPROBE_BIT, |
| @@ -229,7 +228,6 @@ enum { | |||
| 229 | * WAS_ENABLED - Set and stays set when an event was ever enabled | 228 | * WAS_ENABLED - Set and stays set when an event was ever enabled |
| 230 | * (used for module unloading, if a module event is enabled, | 229 | * (used for module unloading, if a module event is enabled, |
| 231 | * it is best to clear the buffers that used it). | 230 | * it is best to clear the buffers that used it). |
| 232 | * USE_CALL_FILTER - For trace internal events, don't use file filter | ||
| 233 | * TRACEPOINT - Event is a tracepoint | 231 | * TRACEPOINT - Event is a tracepoint |
| 234 | * KPROBE - Event is a kprobe | 232 | * KPROBE - Event is a kprobe |
| 235 | * UPROBE - Event is a uprobe | 233 | * UPROBE - Event is a uprobe |
| @@ -240,7 +238,6 @@ enum { | |||
| 240 | TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), | 238 | TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), |
| 241 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), | 239 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), |
| 242 | TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT), | 240 | TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT), |
| 243 | TRACE_EVENT_FL_USE_CALL_FILTER = (1 << TRACE_EVENT_FL_USE_CALL_FILTER_BIT), | ||
| 244 | TRACE_EVENT_FL_TRACEPOINT = (1 << TRACE_EVENT_FL_TRACEPOINT_BIT), | 241 | TRACE_EVENT_FL_TRACEPOINT = (1 << TRACE_EVENT_FL_TRACEPOINT_BIT), |
| 245 | TRACE_EVENT_FL_KPROBE = (1 << TRACE_EVENT_FL_KPROBE_BIT), | 242 | TRACE_EVENT_FL_KPROBE = (1 << TRACE_EVENT_FL_KPROBE_BIT), |
| 246 | TRACE_EVENT_FL_UPROBE = (1 << TRACE_EVENT_FL_UPROBE_BIT), | 243 | TRACE_EVENT_FL_UPROBE = (1 << TRACE_EVENT_FL_UPROBE_BIT), |
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index b3f5051cd4e9..d1d27bf37a19 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
| @@ -689,10 +689,7 @@ static void append_filter_err(struct filter_parse_state *ps, | |||
| 689 | 689 | ||
| 690 | static inline struct event_filter *event_filter(struct trace_event_file *file) | 690 | static inline struct event_filter *event_filter(struct trace_event_file *file) |
| 691 | { | 691 | { |
| 692 | if (file->event_call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | 692 | return file->filter; |
| 693 | return file->event_call->filter; | ||
| 694 | else | ||
| 695 | return file->filter; | ||
| 696 | } | 693 | } |
| 697 | 694 | ||
| 698 | /* caller must hold event_mutex */ | 695 | /* caller must hold event_mutex */ |
| @@ -826,12 +823,7 @@ static void __free_preds(struct event_filter *filter) | |||
| 826 | 823 | ||
| 827 | static void filter_disable(struct trace_event_file *file) | 824 | static void filter_disable(struct trace_event_file *file) |
| 828 | { | 825 | { |
| 829 | struct trace_event_call *call = file->event_call; | 826 | file->flags &= ~EVENT_FILE_FL_FILTERED; |
| 830 | |||
| 831 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | ||
| 832 | call->flags &= ~TRACE_EVENT_FL_FILTERED; | ||
| 833 | else | ||
| 834 | file->flags &= ~EVENT_FILE_FL_FILTERED; | ||
| 835 | } | 827 | } |
| 836 | 828 | ||
| 837 | static void __free_filter(struct event_filter *filter) | 829 | static void __free_filter(struct event_filter *filter) |
| @@ -883,13 +875,8 @@ static int __alloc_preds(struct event_filter *filter, int n_preds) | |||
| 883 | 875 | ||
| 884 | static inline void __remove_filter(struct trace_event_file *file) | 876 | static inline void __remove_filter(struct trace_event_file *file) |
| 885 | { | 877 | { |
| 886 | struct trace_event_call *call = file->event_call; | ||
| 887 | |||
| 888 | filter_disable(file); | 878 | filter_disable(file); |
| 889 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | 879 | remove_filter_string(file->filter); |
| 890 | remove_filter_string(call->filter); | ||
| 891 | else | ||
| 892 | remove_filter_string(file->filter); | ||
| 893 | } | 880 | } |
| 894 | 881 | ||
| 895 | static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir, | 882 | static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir, |
| @@ -906,15 +893,8 @@ static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir, | |||
| 906 | 893 | ||
| 907 | static inline void __free_subsystem_filter(struct trace_event_file *file) | 894 | static inline void __free_subsystem_filter(struct trace_event_file *file) |
| 908 | { | 895 | { |
| 909 | struct trace_event_call *call = file->event_call; | 896 | __free_filter(file->filter); |
| 910 | 897 | file->filter = NULL; | |
| 911 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) { | ||
| 912 | __free_filter(call->filter); | ||
| 913 | call->filter = NULL; | ||
| 914 | } else { | ||
| 915 | __free_filter(file->filter); | ||
| 916 | file->filter = NULL; | ||
| 917 | } | ||
| 918 | } | 898 | } |
| 919 | 899 | ||
| 920 | static void filter_free_subsystem_filters(struct trace_subsystem_dir *dir, | 900 | static void filter_free_subsystem_filters(struct trace_subsystem_dir *dir, |
| @@ -1718,69 +1698,38 @@ fail: | |||
| 1718 | 1698 | ||
| 1719 | static inline void event_set_filtered_flag(struct trace_event_file *file) | 1699 | static inline void event_set_filtered_flag(struct trace_event_file *file) |
| 1720 | { | 1700 | { |
| 1721 | struct trace_event_call *call = file->event_call; | 1701 | file->flags |= EVENT_FILE_FL_FILTERED; |
| 1722 | |||
| 1723 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | ||
| 1724 | call->flags |= TRACE_EVENT_FL_FILTERED; | ||
| 1725 | else | ||
| 1726 | file->flags |= EVENT_FILE_FL_FILTERED; | ||
| 1727 | } | 1702 | } |
| 1728 | 1703 | ||
| 1729 | static inline void event_set_filter(struct trace_event_file *file, | 1704 | static inline void event_set_filter(struct trace_event_file *file, |
| 1730 | struct event_filter *filter) | 1705 | struct event_filter *filter) |
| 1731 | { | 1706 | { |
| 1732 | struct trace_event_call *call = file->event_call; | 1707 | rcu_assign_pointer(file->filter, filter); |
| 1733 | |||
| 1734 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | ||
| 1735 | rcu_assign_pointer(call->filter, filter); | ||
| 1736 | else | ||
| 1737 | rcu_assign_pointer(file->filter, filter); | ||
| 1738 | } | 1708 | } |
| 1739 | 1709 | ||
| 1740 | static inline void event_clear_filter(struct trace_event_file *file) | 1710 | static inline void event_clear_filter(struct trace_event_file *file) |
| 1741 | { | 1711 | { |
| 1742 | struct trace_event_call *call = file->event_call; | 1712 | RCU_INIT_POINTER(file->filter, NULL); |
| 1743 | |||
| 1744 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | ||
| 1745 | RCU_INIT_POINTER(call->filter, NULL); | ||
| 1746 | else | ||
| 1747 | RCU_INIT_POINTER(file->filter, NULL); | ||
| 1748 | } | 1713 | } |
| 1749 | 1714 | ||
| 1750 | static inline void | 1715 | static inline void |
| 1751 | event_set_no_set_filter_flag(struct trace_event_file *file) | 1716 | event_set_no_set_filter_flag(struct trace_event_file *file) |
| 1752 | { | 1717 | { |
| 1753 | struct trace_event_call *call = file->event_call; | 1718 | file->flags |= EVENT_FILE_FL_NO_SET_FILTER; |
| 1754 | |||
| 1755 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | ||
| 1756 | call->flags |= TRACE_EVENT_FL_NO_SET_FILTER; | ||
| 1757 | else | ||
| 1758 | file->flags |= EVENT_FILE_FL_NO_SET_FILTER; | ||
| 1759 | } | 1719 | } |
| 1760 | 1720 | ||
| 1761 | static inline void | 1721 | static inline void |
| 1762 | event_clear_no_set_filter_flag(struct trace_event_file *file) | 1722 | event_clear_no_set_filter_flag(struct trace_event_file *file) |
| 1763 | { | 1723 | { |
| 1764 | struct trace_event_call *call = file->event_call; | 1724 | file->flags &= ~EVENT_FILE_FL_NO_SET_FILTER; |
| 1765 | |||
| 1766 | if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) | ||
| 1767 | call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER; | ||
| 1768 | else | ||
| 1769 | file->flags &= ~EVENT_FILE_FL_NO_SET_FILTER; | ||
| 1770 | } | 1725 | } |
| 1771 | 1726 | ||
| 1772 | static inline bool | 1727 | static inline bool |
| 1773 | event_no_set_filter_flag(struct trace_event_file *file) | 1728 | event_no_set_filter_flag(struct trace_event_file *file) |
| 1774 | { | 1729 | { |
| 1775 | struct trace_event_call *call = file->event_call; | ||
| 1776 | |||
| 1777 | if (file->flags & EVENT_FILE_FL_NO_SET_FILTER) | 1730 | if (file->flags & EVENT_FILE_FL_NO_SET_FILTER) |
| 1778 | return true; | 1731 | return true; |
| 1779 | 1732 | ||
| 1780 | if ((call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) && | ||
| 1781 | (call->flags & TRACE_EVENT_FL_NO_SET_FILTER)) | ||
| 1782 | return true; | ||
| 1783 | |||
| 1784 | return false; | 1733 | return false; |
| 1785 | } | 1734 | } |
| 1786 | 1735 | ||
