• Home
  • Raw
  • Download

Lines Matching refs:old

142 static inline void release_probes(struct tracepoint_func *old)  in release_probes()  argument
144 if (old) { in release_probes()
145 struct tp_probes *tp_probes = container_of(old, in release_probes()
183 struct tracepoint_func *old, *new; in func_add() local
192 old = *funcs; in func_add()
193 if (old) { in func_add()
195 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add()
197 if (pos < 0 && old[nr_probes].prio < prio) in func_add()
199 if (old[nr_probes].func == tp_func->func && in func_add()
200 old[nr_probes].data == tp_func->data) in func_add()
202 if (old[nr_probes].func == tp_stub_func) in func_add()
210 if (old) { in func_add()
216 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add()
217 if (old[nr_probes].func == tp_stub_func) in func_add()
219 if (pos < 0 && old[nr_probes].prio < prio) in func_add()
221 new[probes++] = old[nr_probes]; in func_add()
231 memcpy(new, old, nr_probes * sizeof(struct tracepoint_func)); in func_add()
234 memcpy(new, old, pos * sizeof(struct tracepoint_func)); in func_add()
236 memcpy(new + pos + 1, old + pos, in func_add()
245 return old; in func_add()
252 struct tracepoint_func *old, *new; in func_remove() local
254 old = *funcs; in func_remove()
256 if (!old) in func_remove()
262 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_remove()
263 if ((old[nr_probes].func == tp_func->func && in func_remove()
264 old[nr_probes].data == tp_func->data) || in func_remove()
265 old[nr_probes].func == tp_stub_func) in func_remove()
278 return old; in func_remove()
285 for (i = 0; old[i].func; i++) in func_remove()
286 if ((old[i].func != tp_func->func in func_remove()
287 || old[i].data != tp_func->data) in func_remove()
288 && old[i].func != tp_stub_func) in func_remove()
289 new[j++] = old[i]; in func_remove()
297 for (i = 0; old[i].func; i++) in func_remove()
298 if (old[i].func == tp_func->func && in func_remove()
299 old[i].data == tp_func->data) { in func_remove()
300 old[i].func = tp_stub_func; in func_remove()
302 if (old[i + 1].func) in func_remove()
303 old[i].prio = in func_remove()
304 old[i + 1].prio; in func_remove()
306 old[i].prio = -1; in func_remove()
308 *funcs = old; in func_remove()
312 return old; in func_remove()
348 struct tracepoint_func *old, *tp_funcs; in tracepoint_add_func() local
359 old = func_add(&tp_funcs, func, prio); in tracepoint_add_func()
360 if (IS_ERR(old)) { in tracepoint_add_func()
361 WARN_ON_ONCE(warn && PTR_ERR(old) != -ENOMEM); in tracepoint_add_func()
362 return PTR_ERR(old); in tracepoint_add_func()
399 if (tp_funcs[0].data != old[0].data) in tracepoint_add_func()
407 release_probes(old); in tracepoint_add_func()
420 struct tracepoint_func *old, *tp_funcs; in tracepoint_remove_func() local
424 old = func_remove(&tp_funcs, func); in tracepoint_remove_func()
425 if (WARN_ON_ONCE(IS_ERR(old))) in tracepoint_remove_func()
426 return PTR_ERR(old); in tracepoint_remove_func()
428 if (tp_funcs == old) in tracepoint_remove_func()
458 if (tp_funcs[0].data != old[0].data) in tracepoint_remove_func()
472 if (tp_funcs[0].data != old[0].data) in tracepoint_remove_func()
479 release_probes(old); in tracepoint_remove_func()