mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
debug: clean up kernel/profile.c
Before: total: 25 errors, 13 warnings, 602 lines checked After: total: 0 errors, 2 warnings, 601 lines checked No code changed: kernel/profile.o: text data bss dec hex filename 3048 236 24 3308 cec profile.o.before 3048 236 24 3308 cec profile.o.after md5: 2501d64748a4d350dffb11203e2a5182 profile.o.before.asm 2501d64748a4d350dffb11203e2a5182 profile.o.after.asm Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
6478d8800b
commit
1ad82fd547
1 changed files with 55 additions and 56 deletions
|
@ -141,11 +141,13 @@ int task_handoff_register(struct notifier_block * n)
|
||||||
{
|
{
|
||||||
return atomic_notifier_chain_register(&task_free_notifier, n);
|
return atomic_notifier_chain_register(&task_free_notifier, n);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(task_handoff_register);
|
||||||
|
|
||||||
int task_handoff_unregister(struct notifier_block *n)
|
int task_handoff_unregister(struct notifier_block *n)
|
||||||
{
|
{
|
||||||
return atomic_notifier_chain_unregister(&task_free_notifier, n);
|
return atomic_notifier_chain_unregister(&task_free_notifier, n);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(task_handoff_unregister);
|
||||||
|
|
||||||
int profile_event_register(enum profile_type type, struct notifier_block *n)
|
int profile_event_register(enum profile_type type, struct notifier_block *n)
|
||||||
{
|
{
|
||||||
|
@ -164,7 +166,7 @@ int profile_event_register(enum profile_type type, struct notifier_block * n)
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(profile_event_register);
|
||||||
|
|
||||||
int profile_event_unregister(enum profile_type type, struct notifier_block *n)
|
int profile_event_unregister(enum profile_type type, struct notifier_block *n)
|
||||||
{
|
{
|
||||||
|
@ -183,6 +185,7 @@ int profile_event_unregister(enum profile_type type, struct notifier_block * n)
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(profile_event_unregister);
|
||||||
|
|
||||||
int register_timer_hook(int (*hook)(struct pt_regs *))
|
int register_timer_hook(int (*hook)(struct pt_regs *))
|
||||||
{
|
{
|
||||||
|
@ -191,6 +194,7 @@ int register_timer_hook(int (*hook)(struct pt_regs *))
|
||||||
timer_hook = hook;
|
timer_hook = hook;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(register_timer_hook);
|
||||||
|
|
||||||
void unregister_timer_hook(int (*hook)(struct pt_regs *))
|
void unregister_timer_hook(int (*hook)(struct pt_regs *))
|
||||||
{
|
{
|
||||||
|
@ -199,13 +203,7 @@ void unregister_timer_hook(int (*hook)(struct pt_regs *))
|
||||||
/* make sure all CPUs see the NULL hook */
|
/* make sure all CPUs see the NULL hook */
|
||||||
synchronize_sched(); /* Allow ongoing interrupts to complete. */
|
synchronize_sched(); /* Allow ongoing interrupts to complete. */
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(register_timer_hook);
|
|
||||||
EXPORT_SYMBOL_GPL(unregister_timer_hook);
|
EXPORT_SYMBOL_GPL(unregister_timer_hook);
|
||||||
EXPORT_SYMBOL_GPL(task_handoff_register);
|
|
||||||
EXPORT_SYMBOL_GPL(task_handoff_unregister);
|
|
||||||
EXPORT_SYMBOL_GPL(profile_event_register);
|
|
||||||
EXPORT_SYMBOL_GPL(profile_event_unregister);
|
|
||||||
|
|
||||||
#endif /* CONFIG_PROFILING */
|
#endif /* CONFIG_PROFILING */
|
||||||
|
|
||||||
|
@ -409,7 +407,6 @@ void profile_hits(int type, void *__pc, unsigned int nr_hits)
|
||||||
atomic_add(nr_hits, &prof_buffer[min(pc, prof_len - 1)]);
|
atomic_add(nr_hits, &prof_buffer[min(pc, prof_len - 1)]);
|
||||||
}
|
}
|
||||||
#endif /* !CONFIG_SMP */
|
#endif /* !CONFIG_SMP */
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(profile_hits);
|
EXPORT_SYMBOL_GPL(profile_hits);
|
||||||
|
|
||||||
void profile_tick(int type)
|
void profile_tick(int type)
|
||||||
|
@ -437,8 +434,8 @@ static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer,
|
static int prof_cpu_mask_write_proc(struct file *file,
|
||||||
unsigned long count, void *data)
|
const char __user *buffer, unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
cpumask_t *mask = (cpumask_t *)data;
|
cpumask_t *mask = (cpumask_t *)data;
|
||||||
unsigned long full_count = count, err;
|
unsigned long full_count = count, err;
|
||||||
|
@ -457,7 +454,8 @@ void create_prof_cpu_mask(struct proc_dir_entry *root_irq_dir)
|
||||||
struct proc_dir_entry *entry;
|
struct proc_dir_entry *entry;
|
||||||
|
|
||||||
/* create /proc/irq/prof_cpu_mask */
|
/* create /proc/irq/prof_cpu_mask */
|
||||||
if (!(entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir)))
|
entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
|
||||||
|
if (!entry)
|
||||||
return;
|
return;
|
||||||
entry->data = (void *)&prof_cpu_mask;
|
entry->data = (void *)&prof_cpu_mask;
|
||||||
entry->read_proc = prof_cpu_mask_read_proc;
|
entry->read_proc = prof_cpu_mask_read_proc;
|
||||||
|
@ -591,7 +589,8 @@ static int __init create_proc_profile(void)
|
||||||
return 0;
|
return 0;
|
||||||
if (create_hash_tables())
|
if (create_hash_tables())
|
||||||
return -1;
|
return -1;
|
||||||
if (!(entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL)))
|
entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL);
|
||||||
|
if (!entry)
|
||||||
return 0;
|
return 0;
|
||||||
entry->proc_fops = &proc_profile_operations;
|
entry->proc_fops = &proc_profile_operations;
|
||||||
entry->size = (1+prof_len) * sizeof(atomic_t);
|
entry->size = (1+prof_len) * sizeof(atomic_t);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue