Thanks David.

That was I did at first. You know I compiled perf from git repository
and it is actually not an official version. So I copy all stuffs in
the directory of perf to
/usr/src/linux-header3-3.10.9-031009/tools/perf  and make a soft link
to /usr/bin/perf.

I read the perf-script.py, actually, and set the environment variable
PERF_EXEC_PATH in /etc/profile :
                        export PERF_EXEC_PATH=
/usr/src/linux-header3-3.10.9-031009/tools/perf

But it doesn't work. But after I use the absolute directory, it seems
to work now.  But setting absolute directory still doesn't work on
Redhat 6.0, even if I replaced the total directory of perf.

Here it is. I get a Segmentation fault here.

[pwang7@bn20-171 ~]$ perf script -s perf-script.py
# ========
# captured on: Fri Aug 30 14:00:01 2013
# hostname : bn20-171.dcs.mcnc.org
# os release : 2.6.32-71.el6.x86_64
# perf version : 2.6.32-358.11.1.el6.x86_64.debug
# arch : x86_64
# nrcpus online : 24
# nrcpus avail : 24
# cpudesc : Intel(R) Xeon(R) CPU E5645 @ 2.40GHz
# cpuid : GenuineIntel,6,44,2
# total memory : 99061748 kB
# cmdline : /usr/bin/perf record -e cache-misses ls
# event : name = cache-misses, type = 0, config = 0x3, config1 = 0x0,
config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host = 0, excl_guest
= 0, precise_ip = 0, id = { 1797, 1798, 1799, 1800, 1801, 1802, 1803,
1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814,
1815, 1816, 1817, 1818, 1819, 1820 }
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# ========
#
in trace_begin
Segmentation fault (core dumped)
Best wishes.
Yours,
Wang Peipei


On Fri, Aug 30, 2013 at 2:01 PM, David Ahern <dsah...@gmail.com> wrote:
> On 8/30/13 11:15 AM, Mikhail Kulemin wrote:
>>
>> You should fix perf-script.py
>>
>> replace   sys.path.append(os.environ['PERF_EXEC_PATH'] +
>> '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
>> with
>
>
> better to set/export PERF_EXEC_PATH before running the command.
>
> David
>
>
>
>>
>> sys.path.append(os.getcwd()+"/tools/perf/scripts/python/
>> Perf-Trace-Util/lib/Perf/Trace")
>>
>> this string instruct python interpreter where to find modules to load.
>>
>>
>> Please check that "perf script" command works correctly (output all
>> sample records from perf.data file)
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to