@@ -689,10 +689,7 @@ static void append_filter_err(struct filter_parse_state *ps,
689
689
690
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 )
693
- return file -> event_call -> filter ;
694
- else
695
- return file -> filter ;
692
+ return file -> filter ;
696
693
}
697
694
698
695
/* caller must hold event_mutex */
@@ -826,12 +823,7 @@ static void __free_preds(struct event_filter *filter)
826
823
827
824
static void filter_disable (struct trace_event_file * file )
828
825
{
829
- struct trace_event_call * call = file -> event_call ;
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 ;
826
+ file -> flags &= ~EVENT_FILE_FL_FILTERED ;
835
827
}
836
828
837
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
876
static inline void __remove_filter (struct trace_event_file * file )
885
877
{
886
- struct trace_event_call * call = file -> event_call ;
887
-
888
878
filter_disable (file );
889
- if (call -> flags & TRACE_EVENT_FL_USE_CALL_FILTER )
890
- remove_filter_string (call -> filter );
891
- else
892
- remove_filter_string (file -> filter );
879
+ remove_filter_string (file -> filter );
893
880
}
894
881
895
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
894
static inline void __free_subsystem_filter (struct trace_event_file * file )
908
895
{
909
- struct trace_event_call * call = file -> event_call ;
910
-
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
- }
896
+ __free_filter (file -> filter );
897
+ file -> filter = NULL ;
918
898
}
919
899
920
900
static void filter_free_subsystem_filters (struct trace_subsystem_dir * dir ,
@@ -1718,69 +1698,38 @@ static int replace_preds(struct trace_event_call *call,
1718
1698
1719
1699
static inline void event_set_filtered_flag (struct trace_event_file * file )
1720
1700
{
1721
- struct trace_event_call * call = file -> event_call ;
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 ;
1701
+ file -> flags |= EVENT_FILE_FL_FILTERED ;
1727
1702
}
1728
1703
1729
1704
static inline void event_set_filter (struct trace_event_file * file ,
1730
1705
struct event_filter * filter )
1731
1706
{
1732
- struct trace_event_call * call = file -> event_call ;
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 );
1707
+ rcu_assign_pointer (file -> filter , filter );
1738
1708
}
1739
1709
1740
1710
static inline void event_clear_filter (struct trace_event_file * file )
1741
1711
{
1742
- struct trace_event_call * call = file -> event_call ;
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 );
1712
+ RCU_INIT_POINTER (file -> filter , NULL );
1748
1713
}
1749
1714
1750
1715
static inline void
1751
1716
event_set_no_set_filter_flag (struct trace_event_file * file )
1752
1717
{
1753
- struct trace_event_call * call = file -> event_call ;
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 ;
1718
+ file -> flags |= EVENT_FILE_FL_NO_SET_FILTER ;
1759
1719
}
1760
1720
1761
1721
static inline void
1762
1722
event_clear_no_set_filter_flag (struct trace_event_file * file )
1763
1723
{
1764
- struct trace_event_call * call = file -> event_call ;
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 ;
1724
+ file -> flags &= ~EVENT_FILE_FL_NO_SET_FILTER ;
1770
1725
}
1771
1726
1772
1727
static inline bool
1773
1728
event_no_set_filter_flag (struct trace_event_file * file )
1774
1729
{
1775
- struct trace_event_call * call = file -> event_call ;
1776
-
1777
1730
if (file -> flags & EVENT_FILE_FL_NO_SET_FILTER )
1778
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
1733
return false;
1785
1734
}
1786
1735
0 commit comments