<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<pre>Hello Namhyung,
</pre>
<div class="moz-cite-prefix">
<pre>On 23/06/23 04:55, Namhyung Kim wrote:</pre>
</div>
<blockquote type="cite"
cite="mid:CAM9d7cgUXf6ew8_jK5P83QMCcQw5EVOUbHq561==qzUrf9tujQ@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">Ok, I found two problems.
...
</pre>
<pre class="moz-quote-pre" wrap="">The first one is related to this message. It couldn't find the script
(task-analyzer.py) because PERF_EXEC_PATH is not set.
Running with --exec-path=$PWD was ok, but I got a segfault.
The other problem is in set_regs_in_dict(). It tries to capture
register values in the sample and save them to a dictionary.
The sample doesn't have registers so it should have no problem.
But the 'bf' was not initialized properly when size is 0, and it led
PyUnicode_FromString() returning NULL.
After the changes, it ran ok:
$ sudo ./perf test -v task
116: perf script task-analyzer tests :
--- start ---
test child forked, pid 204088
PASS: "test_basic"
PASS: "test_ns_rename"
PASS: "test_ms_filtertasks_highlight"
PASS: "test_extended_times_timelimit_limittasks"
PASS: "test_summary"
PASS: "test_summaryextended"
PASS: "test_summaryonly"
PASS: "test_extended_times_summary_ns"
PASS: "test_extended_times_summary_ns"
PASS: "test_csv"
PASS: "test_csvsummary"
PASS: "test_csv_extended_times"
PASS: "test_csvsummary_extended"
test child finished with 0
---- end ----
perf script task-analyzer tests: Ok
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">This is interesting. I did not encounter these earlier.
</pre>
<blockquote type="cite"
cite="mid:CAM9d7cgUXf6ew8_jK5P83QMCcQw5EVOUbHq561==qzUrf9tujQ@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">I'll send the fixes soon.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">Thanks for fixing it.</pre>
<blockquote type="cite"
cite="mid:CAM9d7cgUXf6ew8_jK5P83QMCcQw5EVOUbHq561==qzUrf9tujQ@mail.gmail.com">
<blockquote type="cite">
<pre><font face="monospace">
</font></pre>
<pre class="moz-quote-pre" wrap="">You can try the perf-tools-next branch in the perf/perft-tools-next.git repo.
git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
$ make clean all
$ sudo ./perf test -v task
</pre>
</blockquote>
</blockquote>
<pre>I tested with the steps provided, i.e.. clone, /*apply patch 15 (added this step myself)*/, clean, make, ./perf test -v test. But still- test passed:<font face="monospace">
</font></pre>
<pre class="moz-quote-pre" wrap="">'''
~/temp_clones/perf-tools-next/tools/perf git:(master) sudo ./perf test -v test
...
--- start ---
test child forked, pid 75261
PASS: "test_basic"
PASS: "test_ns_rename"
PASS: "test_ms_filtertasks_highlight"
PASS: "test_extended_times_timelimit_limittasks"
PASS: "test_summary"
PASS: "test_summaryextended"
PASS: "test_summaryonly"
PASS: "test_extended_times_summary_ns"
PASS: "test_extended_times_summary_ns"
PASS: "test_csv"
PASS: "test_csvsummary"
PASS: "test_csv_extended_times"
PASS: "test_csvsummary_extended"
test child finished with 0
---- end ----
'''
Maybe my environment had that other things set in such a way that, I did not face any issue (I don't recall doing so though, and these patches have been tested multiple times by more people also).
But thanks, that you debugged this and fixed the issue also, I was unsure of the reason since I did not encounter it.</pre>
<pre><font face="monospace">
</font></pre>
<pre><font face="monospace">Thanks,</font></pre>
<pre><font face="monospace">- AdityaG</font></pre>
</body>
</html>