diff options
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/kernel/module.c b/kernel/module.c index 04379f92f843..93342d992f34 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -3487,50 +3487,3 @@ void module_layout(struct module *mod, | |||
| 3487 | } | 3487 | } |
| 3488 | EXPORT_SYMBOL(module_layout); | 3488 | EXPORT_SYMBOL(module_layout); |
| 3489 | #endif | 3489 | #endif |
| 3490 | |||
| 3491 | #ifdef CONFIG_TRACEPOINTS | ||
| 3492 | void module_update_tracepoints(void) | ||
| 3493 | { | ||
| 3494 | struct module *mod; | ||
| 3495 | |||
| 3496 | mutex_lock(&module_mutex); | ||
| 3497 | list_for_each_entry(mod, &modules, list) | ||
| 3498 | if (!mod->taints) | ||
| 3499 | tracepoint_update_probe_range(mod->tracepoints_ptrs, | ||
| 3500 | mod->tracepoints_ptrs + mod->num_tracepoints); | ||
| 3501 | mutex_unlock(&module_mutex); | ||
| 3502 | } | ||
| 3503 | |||
| 3504 | /* | ||
| 3505 | * Returns 0 if current not found. | ||
| 3506 | * Returns 1 if current found. | ||
| 3507 | */ | ||
| 3508 | int module_get_iter_tracepoints(struct tracepoint_iter *iter) | ||
| 3509 | { | ||
| 3510 | struct module *iter_mod; | ||
| 3511 | int found = 0; | ||
| 3512 | |||
| 3513 | mutex_lock(&module_mutex); | ||
| 3514 | list_for_each_entry(iter_mod, &modules, list) { | ||
| 3515 | if (!iter_mod->taints) { | ||
| 3516 | /* | ||
| 3517 | * Sorted module list | ||
| 3518 | */ | ||
| 3519 | if (iter_mod < iter->module) | ||
| 3520 | continue; | ||
| 3521 | else if (iter_mod > iter->module) | ||
| 3522 | iter->tracepoint = NULL; | ||
| 3523 | found = tracepoint_get_iter_range(&iter->tracepoint, | ||
| 3524 | iter_mod->tracepoints_ptrs, | ||
| 3525 | iter_mod->tracepoints_ptrs | ||
| 3526 | + iter_mod->num_tracepoints); | ||
| 3527 | if (found) { | ||
| 3528 | iter->module = iter_mod; | ||
| 3529 | break; | ||
| 3530 | } | ||
| 3531 | } | ||
| 3532 | } | ||
| 3533 | mutex_unlock(&module_mutex); | ||
| 3534 | return found; | ||
| 3535 | } | ||
| 3536 | #endif | ||
