• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/kernel/trace/

Lines Matching defs:stat

282 	struct tracer_stat		stat;
327 struct ftrace_profile_stat *stat =
328 container_of(trace, struct ftrace_profile_stat, stat);
330 if (!stat || !stat->start)
333 return function_stat_next(&stat->start->records[0], 0);
433 static void ftrace_profile_reset(struct ftrace_profile_stat *stat)
437 pg = stat->pages = stat->start;
445 memset(stat->hash, 0,
449 int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
457 if (stat->pages)
460 stat->pages = (void *)get_zeroed_page(GFP_KERNEL);
461 if (!stat->pages)
477 pg = stat->start = stat->pages;
491 pg = stat->start;
499 free_page((unsigned long)stat->pages);
500 stat->pages = NULL;
501 stat->start = NULL;
508 struct ftrace_profile_stat *stat;
511 stat = &per_cpu(ftrace_profile_stats, cpu);
513 if (stat->hash) {
515 ftrace_profile_reset(stat);
525 stat->hash = kzalloc(sizeof(struct hlist_head) * size, GFP_KERNEL);
527 if (!stat->hash)
538 if (ftrace_profile_pages_init(stat) < 0) {
539 kfree(stat->hash);
540 stat->hash = NULL;
563 ftrace_find_profiled_func(struct ftrace_profile_stat *stat, unsigned long ip)
571 hhd = &stat->hash[key];
584 static void ftrace_add_profile(struct ftrace_profile_stat *stat,
590 hlist_add_head_rcu(&rec->node, &stat->hash[key]);
597 ftrace_profile_alloc(struct ftrace_profile_stat *stat, unsigned long ip)
602 if (atomic_inc_return(&stat->disabled) != 1)
609 rec = ftrace_find_profiled_func(stat, ip);
613 if (stat->pages->index == PROFILES_PER_PAGE) {
614 if (!stat->pages->next)
616 stat->pages = stat->pages->next;
619 rec = &stat->pages->records[stat->pages->index++];
621 ftrace_add_profile(stat, rec);
624 atomic_dec(&stat->disabled);
632 struct ftrace_profile_stat *stat;
641 stat = &__get_cpu_var(ftrace_profile_stats);
642 if (!stat->hash || !ftrace_profile_enabled)
645 rec = ftrace_find_profiled_func(stat, ip);
647 rec = ftrace_profile_alloc(stat, ip);
666 struct ftrace_profile_stat *stat;
672 stat = &__get_cpu_var(ftrace_profile_stats);
673 if (!stat->hash || !ftrace_profile_enabled)
697 rec = ftrace_find_profiled_func(stat, trace->func);
805 /* used to initialize the real stat files */
817 struct ftrace_profile_stat *stat;
824 stat = &per_cpu(ftrace_profile_stats, cpu);
834 "Could not allocate stat file for cpu %d\n",
838 stat->stat = function_stats;
840 stat->stat.name = name;
841 ret = register_stat_tracer(&stat->stat);
844 "Could not register function stat for cpu %d\n",