From greatfox@eyou.com Sun Dec 7 17:55:42 2003 Received: with ECARTIS (v1.0.0; list kernprof); Sun, 07 Dec 2003 17:55:55 -0800 (PST) Received: from eyou.com ([61.136.62.74]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id hB81teTa030100 for ; Sun, 7 Dec 2003 17:55:42 -0800 Received: (EYOU MX PROGRAM); Mon, 08 Dec 2003 09:55:38 +0800 Message-ID: <270848538.03114@eyou.com> Received: from unknown (HELO eyou.com) (172.16.2.2) by 0.0.0.0 with SMTP; Mon, 08 Dec 2003 09:55:38 +0800 Received: (qmail 94170 invoked by uid 65534); 8 Dec 2003 09:55:36 +0800 Date: 8 Dec 2003 09:55:36 +0800 Message-ID: <20031208095536.94169.qmail@eyou.com> From: "laohu" To: kernprof@oss.sgi.com, owner-kernprof@oss.sgi.com CC: dave.jiang@intel.com, yshi7@uic.edu, hawkes@sgi.com, usf_sai@yahoo.com, castor@3pardata.com Reply-To: "laohu" Subject: Help! about PMC domain Content-Type: text/plain X-archive-position: 26 X-ecartis-version: Ecartis v1.0.0 Sender: kernprof-bounce@oss.sgi.com Errors-to: kernprof-bounce@oss.sgi.com X-original-sender: greatfox@eyou.com Precedence: bulk X-list: kernprof Hi all: I am a newbie, and i am employing KERNPROF to evaluate something, but a problem is obsessing me. when i tried to run it on a 2-way Xeon machine, some troubles occurred. In time domain it has no any problem, but in PMC domain kernprof reports as follows: kernel does not support PMC domain. My kernel is 2.4.20. i found there are several lines in smpboot.c: #if defined(CONFIG_KERNPROF) /* * Set up all local APIC performance counter overflow vectors, * if available: */ if (cpu_has_msr && boot_cpu_data.x86 == 6) setup_APIC_perfctr(); #endif but my system reported CPU family is 15, that's say, boot_cpu_data.x86 !=6, so i think this maybe lead to problem. In another file: drivers/char/kernprof.c, case PROF_SET_DOMAIN: if (arg != prof_domain) /* changing domains stops profiling */ prof_stop(); if (arg == PROF_DOMAIN_TIME) { prof_domain = arg; prof_intr_hook = &prof_timer_hook; } else if (arg == PROF_DOMAIN_PERFCTR && have_perfctr()) { ~~~~~~~~~~~~~~~ prof_domain = arg; prof_intr_hook = &prof_perfctr_aux_hook; } else err = -EINVAL; break; have_perfctr() return 0, i found have_perfctr() in include/asm/kernprof.h: #ifdef CONFIG_X86_LOCAL_APIC #define have_perfctr() (cpu_has_msr && boot_cpu_data.x86 == 6) ... i modified include/asm/kernprof.h to: #define have_perfctr() (cpu_has_msr && boot_cpu_data.x86 >= 6) and modified smpboot.c as follows: if (cpu_has_msr && boot_cpu_data.x86 >= 6) setup_APIC_perfctr(); then compiled kernel and rebooted with new kernel, this time, when running kernprof with "-d pmc", kernel panic. who can give me some advices? any comments are welcome. Best regards. --http://www.eyou.com --稳定可靠的电子信箱 语音邮件 移动书签 日历服务 网络存储...亿邮未尽 --http://vip.eyou.com --快快登录亿邮VIP信箱 注册您中意的用户名