mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Tim Cambrant <cambrant@acc.umu.se>
Cc: linux-kernel@vger.kernel.org, akpm@digeo.com
Subject: Re: 2.6.9-rc4-mm1
Date: Mon, 11 Oct 2004 14:40:35 +0200	[thread overview]
Message-ID: <m3zn2tv35o.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <2O6Ho-6ra-51@gated-at.bofh.it> (Tim Cambrant's message of "Mon, 11 Oct 2004 13:40:26 +0200")

Tim Cambrant <cambrant@acc.umu.se> writes:

> On Mon, Oct 11, 2004 at 03:25:02AM -0700, Andrew Morton wrote:
>>
>> optimize-profile-path-slightly.patch
>>   Optimize profile path slightly
>>
>
> I'm still getting an oops at startup with this patch. After reversing
> it, everything is fine. Weren't you supposed to remove that from your
> tree until it was fixed?

There's a fixed version around. I thought Andrew had merged that one?

-Andi

-------------------------------------

Fixed version of profile optimization


Index: linux/kernel/profile.c
===================================================================
--- linux.orig/kernel/profile.c	2004-09-30 10:35:51.%N +0200
+++ linux/kernel/profile.c	2004-10-07 13:22:33.%N +0200
@@ -181,20 +181,27 @@
 EXPORT_SYMBOL_GPL(profile_event_register);
 EXPORT_SYMBOL_GPL(profile_event_unregister);
 
-void profile_hit(int type, void *__pc)
+static inline void __profile_hit(int type, void *__pc)
 {
 	unsigned long pc;
 
-	if (prof_on != type || !prof_buffer)
-		return;
 	pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift;
 	atomic_inc(&prof_buffer[min(pc, prof_len - 1)]);
 }
 
+void profile_hit(int type, void *pc)
+{
+	if (prof_on != type || !prof_buffer)
+		return;
+	__profile_hit(type, pc);
+}
+
 void profile_tick(int type, struct pt_regs *regs)
 {
 	if (type == CPU_PROFILING)
 		profile_hook(regs);
+	if (prof_on != type || !prof_buffer)
+		return;
 	if (!user_mode(regs) && cpu_isset(smp_processor_id(), prof_cpu_mask))
 		profile_hit(type, (void *)profile_pc(regs));
 }


       reply	other threads:[~2004-10-11 12:42 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2O5L3-5Jq-11@gated-at.bofh.it>
     [not found] ` <2O6Ho-6ra-51@gated-at.bofh.it>
2004-10-11 12:40   ` Andi Kleen [this message]
2004-10-11 13:38     ` 2.6.9-rc4-mm1 Rafael J. Wysocki
2004-10-11 14:12       ` 2.6.9-rc4-mm1 J.A. Magallon
2004-10-11 14:23         ` 2.6.9-rc4-mm1 Rafael J. Wysocki
2004-10-11 14:28           ` 2.6.9-rc4-mm1 J.A. Magallon
2004-10-11 15:17             ` 2.6.9-rc4-mm1 Rafael J. Wysocki
2004-10-11 14:50       ` 2.6.9-rc4-mm1 Andi Kleen
2004-10-11 15:21         ` 2.6.9-rc4-mm1 Rafael J. Wysocki
2004-10-14 20:56 2.6.9-rc4-mm1 William Wolf
2004-10-14 23:15 ` 2.6.9-rc4-mm1 Dmitry Torokhov
2004-10-15  3:23   ` 2.6.9-rc4-mm1 William Wolf
2004-10-15  3:30     ` 2.6.9-rc4-mm1 Dmitry Torokhov
2004-10-15  4:43       ` 2.6.9-rc4-mm1 William Wolf
2004-10-15  7:04     ` 2.6.9-rc4-mm1 Mathieu Segaud
     [not found] ` <200410142305.29859.dtor_core@ameritech.net>
2004-10-15  5:14   ` 2.6.9-rc4-mm1 William Wolf
2004-10-15  4:25     ` 2.6.9-rc4-mm1 Dmitry Torokhov
2004-10-15  5:26   ` 2.6.9-rc4-mm1 William Wolf
  -- strict thread matches above, loose matches on Subject: below --
2004-10-12  4:07 2.6.9-rc4-mm1 Paul Blazejowski
2004-10-11 14:30 2.6.9-rc4-mm1 Albert Cahalan
2004-10-11 12:41 2.6.9-rc4-mm1 Oleg Nesterov
2004-10-11 10:25 2.6.9-rc4-mm1 Andrew Morton
2004-10-11 11:29 ` 2.6.9-rc4-mm1 Eyal Lebedinsky
2004-10-11 11:37 ` 2.6.9-rc4-mm1 Tim Cambrant
2004-10-11 11:38 ` 2.6.9-rc4-mm1 Nick Piggin
2004-10-11 19:13   ` 2.6.9-rc4-mm1 Andrew Morton
2004-10-11 22:57     ` 2.6.9-rc4-mm1 Nick Piggin
2004-10-11 11:43 ` 2.6.9-rc4-mm1 Brice Goglin
2004-10-11 12:30 ` 2.6.9-rc4-mm1 Con Kolivas
2004-10-11 13:17   ` 2.6.9-rc4-mm1 Alan Cox
2004-10-11 14:23     ` 2.6.9-rc4-mm1 Con Kolivas
2004-10-11 14:30     ` 2.6.9-rc4-mm1 J.A. Magallon
2004-10-11 13:43 ` 2.6.9-rc4-mm1 Jack Byer
2004-10-11 21:58   ` 2.6.9-rc4-mm1 Andrew Morton
2004-10-11 22:10     ` 2.6.9-rc4-mm1 Tom Rini
2004-10-11 23:14     ` 2.6.9-rc4-mm1 Thayne Harbaugh
2004-10-12  0:32     ` 2.6.9-rc4-mm1 Jack Byer
2004-10-11 14:22 ` 2.6.9-rc4-mm1 J.A. Magallon
2004-10-11 14:23 ` 2.6.9-rc4-mm1 Eyal Lebedinsky
2004-10-11 15:47 ` 2.6.9-rc4-mm1 Zwane Mwaikambo
2004-10-11 15:49   ` 2.6.9-rc4-mm1 Andi Kleen
2004-10-11 15:58     ` 2.6.9-rc4-mm1 Zwane Mwaikambo
2004-10-11 16:01       ` 2.6.9-rc4-mm1 Andi Kleen
2004-10-11 19:55   ` 2.6.9-rc4-mm1 Andrew Morton
2004-10-11 21:52     ` 2.6.9-rc4-mm1 Andi Kleen
2004-10-12 14:24     ` 2.6.9-rc4-mm1 Zwane Mwaikambo
2004-10-11 16:08 ` 2.6.9-rc4-mm1 Jeff Garzik
2004-10-11 22:38   ` 2.6.9-rc4-mm1 Lee Revell
2004-10-11 18:51 ` 2.6.9-rc4-mm1 Brice Goglin
2004-10-11 20:18   ` 2.6.9-rc4-mm1 Adrian Bunk
2004-10-13  7:42 ` 2.6.9-rc4-mm1 Wen-chien Jesse Sung
2004-10-13  8:16   ` 2.6.9-rc4-mm1 Hideo AOKI
2004-10-13 13:07 ` 2.6.9-rc4-mm1 Jesse Stockall
2004-10-13 13:19   ` 2.6.9-rc4-mm1 Mathieu Segaud
2004-10-13 13:34     ` 2.6.9-rc4-mm1 Jesse Stockall
2004-10-13 17:27     ` 2.6.9-rc4-mm1 Peter Adebahr
2004-10-14  4:42 ` 2.6.9-rc4-mm1 Hiroyuki KAMEZAWA
2004-10-14  4:50   ` 2.6.9-rc4-mm1 Andrew Morton
2004-10-14  5:23     ` 2.6.9-rc4-mm1 Hiroyuki KAMEZAWA
2004-10-14 17:50     ` 2.6.9-rc4-mm1 Christian Borntraeger
2004-10-15  7:08       ` 2.6.9-rc4-mm1 J.A. Magallon
2004-10-15 16:47         ` 2.6.9-rc4-mm1 Lee Revell

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=m3zn2tv35o.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=akpm@digeo.com \
    --cc=cambrant@acc.umu.se \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome