mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xuefeng Li <lixuefeng@loongson.cn>,
	David Daney <david.daney@cavium.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Archer Yan <ayan@wavecomp.com>,
	x86@kernel.org
Subject: Re: [PATCH 1/3] MIPS: kernel: Support extracting off-line stack traces from user-space with perf
Date: Mon, 4 Jan 2021 11:59:04 +0100	[thread overview]
Message-ID: <20210104105904.GK3021@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1609246561-5474-2-git-send-email-yangtiezhu@loongson.cn>

On Tue, Dec 29, 2020 at 08:55:59PM +0800, Tiezhu Yang wrote:
> +u64 perf_reg_abi(struct task_struct *tsk)
> +{
> +	if (test_tsk_thread_flag(tsk, TIF_32BIT_REGS))
> +		return PERF_SAMPLE_REGS_ABI_32;
> +	else
> +		return PERF_SAMPLE_REGS_ABI_64;
> +}

So we recently changed this on x86 to not rely on TIF flags. IIRC the
problem is that on x86 you can change the mode of a task without the
kernel being aware of it. Is something like that possible on MIPS as
well?

The thing x86 does today is look at it's pt_regs state to determine the
actual state.

  reply	other threads:[~2021-01-04 11:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 12:55 [PATCH 0/3] Add some perf support for mips Tiezhu Yang
2020-12-29 12:55 ` [PATCH 1/3] MIPS: kernel: Support extracting off-line stack traces from user-space with perf Tiezhu Yang
2021-01-04 10:59   ` Peter Zijlstra [this message]
2021-01-05  3:45     ` Jiaxun Yang
2021-01-05 10:18       ` Peter Zijlstra
2021-01-27 21:15         ` Thomas Bogendoerfer
2021-01-29  2:48           ` Tiezhu Yang
2021-01-29 17:56             ` Arnaldo Carvalho de Melo
2021-01-29 17:58           ` Arnaldo Carvalho de Melo
2021-02-01 10:43   ` Thomas Bogendoerfer
2021-02-01 12:56     ` Tiezhu Yang
2021-02-03 10:40       ` Thomas Bogendoerfer
2021-02-03 13:12         ` Tiezhu Yang
2021-02-03 13:41           ` Thomas Bogendoerfer
2020-12-29 12:56 ` [PATCH 2/3] perf tools: Support mips unwinding and dwarf-regs Tiezhu Yang
2020-12-29 12:56 ` [PATCH 3/3] perf tools: Generate mips syscalls_n64.c syscall table Tiezhu Yang

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=20210104105904.GK3021@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ayan@wavecomp.com \
    --cc=david.daney@cavium.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=x86@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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®