<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/loongarch/kernel/stacktrace.c, branch linux-6.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-08-12T05:10:11Z</updated>
<entry>
<title>LoongArch: Add USER_STACKTRACE support</title>
<updated>2022-08-12T05:10:11Z</updated>
<author>
<name>Qing Zhang</name>
</author>
<published>2022-08-06T08:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d7bf939df08218e682f7a42952eee3bad4dceb7'/>
<id>urn:sha1:4d7bf939df08218e682f7a42952eee3bad4dceb7</id>
<content type='text'>
To get the best stacktrace output, you can compile your userspace
programs with frame pointers (at least glibc + the app you are tracing).

1, export "CC = gcc -fno-omit-frame-pointer";
2, compile your programs with "CC";
3, use uprobe to get stacktrace output.

...
     echo 'p:malloc /usr/lib64/libc.so.6:0x0a4704 size=%r4:u64' &gt; uprobe_events
     echo 'p:free /usr/lib64/libc.so.6:0x0a4d50 ptr=%r4:x64' &gt;&gt; uprobe_events
     echo 'comm == "demo"' &gt; ./events/uprobes/malloc/filter
     echo 'comm == "demo"' &gt; ./events/uprobes/free/filter
     echo 1 &gt; ./options/userstacktrace
     echo 1 &gt; ./options/sym-userobj
...

Signed-off-by: Qing Zhang &lt;zhangqing@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>LoongArch: Add STACKTRACE support</title>
<updated>2022-08-12T05:10:11Z</updated>
<author>
<name>Qing Zhang</name>
</author>
<published>2022-08-06T08:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=93a4fa622eb061f75f87f0cf9609ab4e69c67d01'/>
<id>urn:sha1:93a4fa622eb061f75f87f0cf9609ab4e69c67d01</id>
<content type='text'>
1. Use common arch_stack_walk() infrastructure to avoid duplicated code
   and avoid taking care of the stack storage and filtering.
2. Add sched_ra (means sched return address) and sched_cfa (means sched
   call frame address) to thread_info, and store them in switch_to().
3. Add __get_wchan() implementation.

Now we can print the process stack and wait channel by cat /proc/*/stack
and /proc/*/wchan.

Signed-off-by: Qing Zhang &lt;zhangqing@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
</feed>
