From: Michael Schmitz <schmitzmic@gmail.com>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@linux-m68k.org>,
Tomas Glozar <tglozar@redhat.com>
Subject: Re: [PATCH RFC 0/2] Add basic tracing support for m68k
Date: Wed, 20 Nov 2024 07:25:29 +1300 [thread overview]
Message-ID: <1fbfc00d-27c0-4486-816d-50291bebc842@gmail.com> (raw)
In-Reply-To: <e4456cb1-b1bc-453b-b3b5-3ee4f03995be@yoseli.org>
Hi Steve,
On 20/11/24 07:06, Jean-Michel Hautbois wrote:
>
>> You reference two variables that are not part of the event:
>>
>> "mem_map" and "m68k_memory[0].addr"
>>
>> Do these variables ever change? Because the TP_printk() part of the
>> TRACE_EVENT() macro is called a long time after the event is
>> recorded. It
>> could be seconds, minutes, days or even months (and unlikely possibly
>> years) later.
>
> I am really not the best placed to answer.
> AFAIK, it sounds like those are never changing.
m68k_memory[0].addr never changes (that segment is usually where the
kernel is loaded to, and can't be hotplugged).
mem_map is equal to NODE_DATA(0)->node_mem_map on m68k
(mm/mm_init.c:__init alloc_node_mem_map()) and won't change either.
Cheers,
Michael
>
>>
>> The event takes place and runs the TP_fast_assign() to record the
>> event in
>> the ring buffer. Then some time later, when you read the "trace"
>> file, the
>> TP_printk() portion gets run. If you wait months before reading that,
>> it is
>> executed months later.
>>
>> Now you have "mem_map" and "m68k_memory[0].addr" in that output that
>> gets
>> run months after the fact. Are they constant throughout the boot?
>
> I don't know.
>
>> Now another issue is that user space has no idea what those values
>> are. Now
>> user space can not print the values. Currently the code crashes
>> because you
>> are the first one to reference a global value from a trace event
>> print fmt.
>> That should probably be fixed to simply fail to parse the event and
>> ignore
>> the print format logic (which defaults to just printing the raw fields).
>
> The patch you sent works...
> But, it fails a bit later:
> Dispatching timerlat u procs
> starting loop
> User-space timerlat pid 230 on cpu 0
> Segmentation fault
>
>
>>
>> -- Steve
>>
>
>
next prev parent reply other threads:[~2024-11-19 18:25 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 9:44 Jean-Michel Hautbois
2024-10-21 9:44 ` [PATCH RFC 1/2] m68k: Add tracirqs Jean-Michel Hautbois
2024-10-22 5:28 ` Steven Rostedt
2024-10-22 5:42 ` Jean-Michel Hautbois
2024-10-22 8:30 ` Steven Rostedt
2024-10-22 9:21 ` Jean-Michel Hautbois
2024-10-23 8:47 ` Steven Rostedt
2024-10-23 9:07 ` Jean-Michel Hautbois
2024-10-23 9:13 ` Geert Uytterhoeven
2024-10-23 9:31 ` Jean-Michel Hautbois
2024-10-23 10:30 ` Jean-Michel Hautbois
2024-10-23 3:53 ` Michael Schmitz
2024-10-23 5:53 ` Jean-Michel Hautbois
2024-10-23 7:30 ` Michael Schmitz
2024-10-23 8:59 ` Jean-Michel Hautbois
2024-10-23 9:27 ` Steven Rostedt
2024-10-23 8:51 ` Eero Tamminen
2024-10-21 9:44 ` [PATCH RFC 2/2] arch: m68k: Add STACKTRACE support Jean-Michel Hautbois
2024-11-27 11:26 ` Jean-Michel Hautbois
2024-12-02 14:41 ` Greg Ungerer
2024-12-02 14:51 ` Jean-Michel Hautbois
2024-12-02 14:52 ` Jean-Michel Hautbois
2024-12-02 23:01 ` Greg Ungerer
2024-12-03 6:25 ` Jean-Michel Hautbois
2024-12-02 17:53 ` Jean-Michel Hautbois
2024-11-15 8:26 ` [PATCH RFC 0/2] Add basic tracing support for m68k Jean-Michel Hautbois
2024-11-15 15:25 ` Steven Rostedt
2024-11-15 15:33 ` Jean-Michel Hautbois
2024-11-15 19:55 ` Steven Rostedt
2024-11-18 10:11 ` Jean-Michel Hautbois
2024-11-18 20:20 ` Steven Rostedt
2024-11-19 14:24 ` Jean-Michel Hautbois
2024-11-19 15:26 ` Steven Rostedt
2024-11-19 16:28 ` Steven Rostedt
2024-11-19 16:44 ` Steven Rostedt
2024-11-19 18:06 ` Jean-Michel Hautbois
2024-11-19 18:10 ` Steven Rostedt
2024-11-20 11:47 ` Jean-Michel Hautbois
2024-11-20 15:31 ` Steven Rostedt
2024-11-20 15:59 ` Jean-Michel Hautbois
2024-11-20 16:43 ` Steven Rostedt
2024-11-20 16:51 ` Jean-Michel Hautbois
2024-11-19 18:25 ` Michael Schmitz [this message]
2024-11-28 15:25 ` Tomas Glozar
2024-12-02 12:53 ` Jean-Michel Hautbois
2024-12-02 14:45 ` Tomas Glozar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1fbfc00d-27c0-4486-816d-50291bebc842@gmail.com \
--to=schmitzmic@gmail.com \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=jeanmichel.hautbois@yoseli.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®