@@ -1883,7 +1883,24 @@ static bool ftrace_hash_rec_enable(struct ftrace_ops *ops)
1883
1883
return __ftrace_hash_rec_update (ops , true);
1884
1884
}
1885
1885
1886
- static void ftrace_hash_rec_update_modify (struct ftrace_ops * ops , int inc )
1886
+ /*
1887
+ * This function will update what functions @ops traces when its filter
1888
+ * changes.
1889
+ *
1890
+ * The @inc states if the @ops callbacks are going to be added or removed.
1891
+ * When one of the @ops hashes are updated to a "new_hash" the dyn_ftrace
1892
+ * records are update via:
1893
+ *
1894
+ * ftrace_hash_rec_disable_modify(ops);
1895
+ * ops->hash = new_hash
1896
+ * ftrace_hash_rec_enable_modify(ops);
1897
+ *
1898
+ * Where the @ops is removed from all the records it is tracing using
1899
+ * its old hash. The @ops hash is updated to the new hash, and then
1900
+ * the @ops is added back to the records so that it is tracing all
1901
+ * the new functions.
1902
+ */
1903
+ static void ftrace_hash_rec_update_modify (struct ftrace_ops * ops , bool inc )
1887
1904
{
1888
1905
struct ftrace_ops * op ;
1889
1906
@@ -1907,12 +1924,12 @@ static void ftrace_hash_rec_update_modify(struct ftrace_ops *ops, int inc)
1907
1924
1908
1925
static void ftrace_hash_rec_disable_modify (struct ftrace_ops * ops )
1909
1926
{
1910
- ftrace_hash_rec_update_modify (ops , 0 );
1927
+ ftrace_hash_rec_update_modify (ops , false );
1911
1928
}
1912
1929
1913
1930
static void ftrace_hash_rec_enable_modify (struct ftrace_ops * ops )
1914
1931
{
1915
- ftrace_hash_rec_update_modify (ops , 1 );
1932
+ ftrace_hash_rec_update_modify (ops , true );
1916
1933
}
1917
1934
1918
1935
/*
0 commit comments