- pv->page_size = PAGE_SIZE;
- _profile_md_init(pv, PROFILE_GPROF, PROFILE_ALLOC_MEM_YES);
-
- /* Profil related variables */
- pv->profil_buf = _profile_alloc (pv, monsize, ACONTEXT_PROFIL);
- pv->profil_info.highpc = highpc;
- pv->profil_info.lowpc = lowpc;
- pv->profil_info.text_len = textsize;
- pv->profil_info.profil_len = monsize;
- pv->profil_info.counter_size = sizeof(LHISTCOUNTER);
- pv->profil_info.scale = 0x10000 / HISTFRACTION;
- pv->stats.profil_buckets = monsize / sizeof(LHISTCOUNTER);
-
- /* Other gprof variables */
- pv->stats.my_cpu = i;
- pv->stats.max_cpu = NCPUS;
- pv->init = 1;
- pv->active = 1;
- pv->use_dci = 0;
- pv->use_profil = 1;
- pv->check_funcs = 1; /* for now */
-
- if (pv->debug) {
- printf("Profiling kernel, s_textsize=%ld, monsize=%ld [0x%lx..0x%lx], cpu = %d\n",
- (long)textsize,
- (long)monsize,
- (long)lowpc,
- (long)highpc,
- i);
- }
+ pv->page_size = PAGE_SIZE;
+ _profile_md_init(pv, PROFILE_GPROF, PROFILE_ALLOC_MEM_YES);
+
+ /* Profil related variables */
+ pv->profil_buf = _profile_alloc (pv, monsize, ACONTEXT_PROFIL);
+ pv->profil_info.highpc = highpc;
+ pv->profil_info.lowpc = lowpc;
+ pv->profil_info.text_len = textsize;
+ pv->profil_info.profil_len = monsize;
+ pv->profil_info.counter_size = sizeof(LHISTCOUNTER);
+ pv->profil_info.scale = 0x10000 / HISTFRACTION;
+ pv->stats.profil_buckets = monsize / sizeof(LHISTCOUNTER);
+
+ /* Other gprof variables */
+ pv->stats.my_cpu = 0;
+ pv->stats.max_cpu = 1; /* initial number of cpus */
+ pv->init = 1;
+ pv->active = 1;
+ pv->use_dci = 0;
+ pv->use_profil = 1;
+ pv->check_funcs = 1; /* for now */
+
+ if (pv->debug) {
+ printf("Profiling kernel, s_textsize=%ld, monsize=%ld [0x%lx..0x%lx], cpu = %d\n",
+ (long)textsize,
+ (long)monsize,
+ (long)lowpc,
+ (long)highpc,
+ 0);