<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/tools/perf/util, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-11T14:59:08+00:00</updated>
<entry>
<title>Merge branch 'modules-next' of https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git</title>
<updated>2026-09-11T14:59:08+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-11T14:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=dcdcd27bd5deea6d5a46dd5364ac808f7fff85e5'/>
<id>urn:sha1:dcdcd27bd5deea6d5a46dd5364ac808f7fff85e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>module/kallsyms: Rename is_mapping_symbol() to is_ignored_kernel_symbol()</title>
<updated>2026-09-09T10:15:36+00:00</updated>
<author>
<name>Tiezhu Yang</name>
<email>yangtiezhu@loongson.cn</email>
</author>
<published>2026-08-20T12:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=db91da8f05185706f492841d96864ad78893dd62'/>
<id>urn:sha1:db91da8f05185706f492841d96864ad78893dd62</id>
<content type='text'>
The helper function is_mapping_symbol() historically checks for both
local labels prefixed with ".L" or "L0" and mapping symbols prefixed
with "$".

Rename it to is_ignored_kernel_symbol() to better reflect this actual
behavior and scope, preventing conceptual confusion.

While at it, update the related non-module files, no functional changes.

Suggested-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Tiezhu Yang &lt;yangtiezhu@loongson.cn&gt;
Reviewed-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
</content>
</entry>
<entry>
<title>perf unwind: Handle allocation failure in libdw__get_entries()</title>
<updated>2026-09-08T21:51:13+00:00</updated>
<author>
<name>Triet Hoang</name>
<email>triet.hoang.dev@gmail.com</email>
</author>
<published>2026-08-18T14:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=aa18964dd64511305de0711fed912054da6f5d18'/>
<id>urn:sha1:aa18964dd64511305de0711fed912054da6f5d18</id>
<content type='text'>
Check the return value of zalloc() before dereferencing the allocated
dwfl_ui_ti structure.

Return -ENOMEM when the allocation fails to avoid a NULL pointer
dereference.

Signed-off-by: Triet Hoang &lt;triet.hoang.dev@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf annotate: add Alpha instruction support</title>
<updated>2026-09-08T21:08:53+00:00</updated>
<author>
<name>Matt Turner</name>
<email>mattst88@gmail.com</email>
</author>
<published>2026-09-05T22:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c749aacf7378973d6cd65bcbf21361079918ec0a'/>
<id>urn:sha1:c749aacf7378973d6cd65bcbf21361079918ec0a</id>
<content type='text'>
Teach perf annotate about the Alpha control-transfer instructions, so that
an Alpha perf.data gets call and jump arrows and resolved call targets,
whether it is read on Alpha or on another host.

Add tools/perf/util/annotate-arch/annotate-alpha.c with arch__new_alpha()
and an associate_instruction_ops() that classifies:

  call:   bsr, plus jsr and jcr as indirect calls
  ret:    ret
  jump:   br, the conditional branches beq/bne/blt/ble/bgt/bge/blbc/blbs
          and fbeq/fbne/fblt/fble/fbgt/fbge, plus jmp as an indirect jump
  mov:    mov, fmov (objdump pseudos)

That is every mnemonic binutils can print for the branch and JSR formats.
jcr rather than jsr_coroutine, because both name the same MBR(0x1a,3)
encoding and print_insn_alpha() takes the first match in the table, where
the jcr alias has come first since the sources were imported in 1999.

bsr needs an Alpha-specific parse routine.  The generic call__parse()
expects the operand string to begin with the target address, but a bsr
prints its return-address register first:

  bsr     t0,fffffc0001031dc0 &lt;cserve_ena&gt;

strtoull() then stops on the leading register name, leaving the target
address as 0, which makes call__scnprintf() fall back to printing the raw
operands and leaves target.sym unresolved so the browser cannot follow the
call.  alpha_call__parse() takes the address from after the comma instead,
as s390_call__parse() does for the same reason.  The PC-relative branches
need no such handling, as jump__parse() already skips up to two operands.

jsr and jmp get ins_ops that resolve no target at all.  They transfer
control to a register, and their trailing operand is only a branch
prediction hint:

  jsr     ra,(t12),fffffc0001014ee8 &lt;_printk&gt;

binutils extracts that hint as a 14-bit signed field scaled by four and
prints it relative to the next instruction (extract_jhint() in alpha-opc.c,
print_insn_alpha() in alpha-dis.c), so it can name the callee only when the
callee lies within the resulting +-32KB.  It also defaults to zero, which
prints as the next instruction.  Of the 213750 jsr in a vmlinux built from
this tree, only 23093 hints land on a symbol; 157204 point into the middle
of an unrelated function and 33453 are that default.  Parsing the hint
would therefore invent a call target for the majority of calls, so these
keep their operands, as an indirect call does elsewhere.

EM_ALPHA is 0x9026, far too large to index the e_machine-keyed
arch_new_fn[] table in arch__find(), so select arch__new_alpha explicitly
before the table lookup.  Declare it in disasm.h and add the object to the
annotate-arch Build.

Disassembly itself comes from objdump/binutils, which already supports
Alpha; this provides perf's instruction-class metadata for annotation.

Tested on an EV7 Marvel, both natively and by annotating its perf.data on
an x86_64 host, over bsr to a local function, jsr through the PLT and
kernel-mode jsr; the two hosts produce identical output.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf thread: Fix live-session detection in thread__e_machine()</title>
<updated>2026-09-08T21:08:37+00:00</updated>
<author>
<name>Matt Turner</name>
<email>mattst88@gmail.com</email>
</author>
<published>2026-09-05T22:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=15917a3a1ce0695f824892c8f9d0dc51408ee580'/>
<id>urn:sha1:15917a3a1ce0695f824892c8f9d0dc51408ee580</id>
<content type='text'>
When the per-thread e_machine cannot be determined from the DSOs in the
thread's maps, thread__e_machine_endian() decides between reading
/proc/&lt;pid&gt;/exe and falling back to the recorded session environment:

	bool is_live = machine-&gt;machines == NULL;

	if (!is_live) {
		/* Check if the session has a data file. */
		struct perf_session *session = container_of(...);

		is_live = !!session-&gt;data;
	}

Neither half of that works.

The back pointer added by commit a088031c4998 ("perf tools: Add machine to
machines back pointer") is set by machines__add(), which only ever adds
guests; the host machine never gets one.  Host-machine threads, which is to
say almost all of them, therefore see machine-&gt;machines == NULL and are
declared live before the session is consulted at all.

The session test is also inverted.  A session with a perf_data attached is
one being read from a perf.data file, i.e. exactly the case that is not
live, while a live session such as 'perf top' passes data=NULL to
__perf_session__new().

So a file-based session takes the live path and reads /proc/&lt;pid&gt;/exe on
the analysing host, which at best describes an unrelated process that has
since been given the recorded pid, and normally just fails, leaving
e_machine as EM_NONE.  The perf_env fallback that would have supplied the
recorded architecture is never reached, and thread__e_machine() returns
EM_HOST.

For a same-architecture recording this is invisible, since EM_HOST is the
right answer anyway.  Cross-architecture it is not: annotating an Alpha
perf.data on an x86_64 host selects the x86 struct arch, so the Alpha
disassembly is matched against the x86 instruction table.  Alpha's 'ret'
collides with x86's and gets ret_ops, while its calls and branches match
nothing and are left unparsed, so no call target is resolved and no jump
arrows are drawn.

Set the back pointer for the host machine and correct the session test.
The new back pointer does not disturb the other reader of the field,
machine__findnew_guest_code(), which machine__resolve() only calls when
!machine__is_host(machine).

Fixes: 70351029b55677eb ("perf thread: Add support for reading the e_machine type for a thread")
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf python: Fix redundant self-assignment in get_argument_count()</title>
<updated>2026-09-08T20:57:06+00:00</updated>
<author>
<name>Liu Jing</name>
<email>liujing@cmss.chinamobile.com</email>
</author>
<published>2026-09-03T08:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9e8c2fbadfa44d3cadfeaaefae1423259982bed5'/>
<id>urn:sha1:9e8c2fbadfa44d3cadfeaaefae1423259982bed5</id>
<content type='text'>
In get_argument_count(), the variable code_obj is assigned to itself
before being assigned the result of PyObject_GetAttrString(). This is
a redundant self-assignment that appears to be a typo.

Fix it by removing the redundant self-assignment.

Signed-off-by: Liu Jing &lt;liujing@cmss.chinamobile.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf powerpc-vpadtl: Fix off-by-one in auxtrace_info minimum size check</title>
<updated>2026-09-08T20:50:39+00:00</updated>
<author>
<name>Wang Yan</name>
<email>wangyan01@kylinos.cn</email>
</author>
<published>2026-08-24T02:55:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d9c7e2ede92ce258a5d4a6cbc55f75acd379c97d'/>
<id>urn:sha1:d9c7e2ede92ce258a5d4a6cbc55f75acd379c97d</id>
<content type='text'>
min_sz is set to sizeof(u64) * POWERPC_VPADTL_TYPE, but the code reads
auxtrace_info-&gt;priv[POWERPC_VPADTL_TYPE], which needs at least
POWERPC_VPADTL_TYPE + 1 elements.  POWERPC_VPADTL_TYPE is the first
enumerator of the priv index enum (0), so min_sz evaluates to 0 and the
check validates only the perf_record_auxtrace_info header itself.  A
PERF_RECORD_AUXTRACE_INFO event carrying a zero-length priv array then
passes the size check, and the subsequent priv[POWERPC_VPADTL_TYPE]
read runs one u64 past the validated region.

This is the same off-by-one fixed for Intel PT by commit c4362d5e1a5e
("perf intel-pt: Fix off-by-one in auxtrace_info minimum size check")
and for Intel BTS by commit b9fb8225951c ("perf intel-bts: Fix off-by-one
in auxtrace_info minimum size check").

Use sizeof(u64) * (POWERPC_VPADTL_TYPE + 1) so the highest accessed
priv index is covered by the minimum-size validation.

Fixes: c4bbd4ec2e50a9ed ("perf powerpc: Process auxtrace events and display in 'perf report -D'")
Reviewed-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Wang Yan &lt;wangyan01@kylinos.cn&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hist: Remove keysym.h include from hist.h</title>
<updated>2026-09-08T20:50:37+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-02T15:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=537ff9c4271d0903f3652886aa29371a104ea649'/>
<id>urn:sha1:537ff9c4271d0903f3652886aa29371a104ea649</id>
<content type='text'>
hist.h isn't related to UI and so remove the UI inclusion. Fix the
transitive dependency issues this exposes.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tool: Move usage strings and functions to perf.c</title>
<updated>2026-09-08T20:50:32+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-02T15:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c6b40a642563c7b9ddaea19880c0c36659cc7743'/>
<id>urn:sha1:c6b40a642563c7b9ddaea19880c0c36659cc7743</id>
<content type='text'>
The code is mostly used by perf.c with additional unused functionality
such as function pointers derived from early git code. Moving it into
perf.c directly reduces the code footprint, drops the util/util.h
dependence from perf.c, and allows us to remove util/usage.c entirely.

The string constants are exposed in builtin.h, as they are used
in builtin-help.c.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tool: Tidy up util/cache.h header file users</title>
<updated>2026-09-08T20:50:28+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-09-02T15:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=583ba92ef0ecd95c9b27e2574fa44f3e6fcb9848'/>
<id>urn:sha1:583ba92ef0ecd95c9b27e2574fa44f3e6fcb9848</id>
<content type='text'>
Use git clang-format to sort header files. Review header file includes
removing those that were unnecessary or adding explicit includes in
cases where transitive dependencies were be using.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
