Skip to contentSkip to conversation

ftrace: use .sched.text, not .text.sched in recordmcount.pl.

PATCH In review Tim Abbott 3 participants 4 messages May 1, 2009 – May 6, 2009

lore
Share & tools
lore

Tim Abbott

author
#0 lore raw

PATCH 1/1 ftrace: use .sched.text, not .text.sched in recordmcount.pl.

The only references in the kernel to the .text.sched section are in recordmcount.pl. Since the code it has is intended to be example code it should refer to real kernel sections. So change it to .sched.text instead.

Cc Steven Rostedt <[email protected]>
---
 scripts/recordmcount.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/recordmcount.pl +3 -3
index 409596e..0fae7da 100755
@@ -26,7 +26,7 @@
 # which will also be the location of that section after final link.
 # e.g.
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  .globl my_func
 #  my_func:
 #        [...]
@@ -39,7 +39,7 @@
 #        [...]
 #
 # Both relocation offsets for the mcounts in the above example will be
-# offset from .text.sched. If we make another file called tmp.s with:
+# offset from .sched.text. If we make another file called tmp.s with:
 #
 #  .section __mcount_loc
 #  .quad  my_func + 0x5
@@ -51,7 +51,7 @@
 # But this gets hard if my_func is not globl (a static function).
 # In such a case we have:
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  my_func:
 #        [...]
 #        call mcount  (offset: 0x5)
Signature · 1 line
1.6.2.1
#1 lore raw
Quoted 7 lines · Tim Abbott

The only references in the kernel to the .text.sched section are in recordmcount.pl. Since the code it has is intended to be example code it should refer to real kernel sections. So change it to .sched.text instead.

Cc Steven Rostedt <[email protected]>

Steven - this change is independent of the ongoing section rework and is a pure documentation fix.

Please apply it with my ack.

Sam

[Kept whole patch for reference]

Quoted 38 lines
---
 scripts/recordmcount.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/recordmcount.pl +3 -3
index 409596e..0fae7da 100755
@@ -26,7 +26,7 @@
 # which will also be the location of that section after final link.
 # e.g.
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  .globl my_func
 #  my_func:
 #        [...]
@@ -39,7 +39,7 @@
 #        [...]
 #
 # Both relocation offsets for the mcounts in the above example will be
-# offset from .text.sched. If we make another file called tmp.s with:
+# offset from .sched.text. If we make another file called tmp.s with:
 #
 #  .section __mcount_loc
 #  .quad  my_func + 0x5
@@ -51,7 +51,7 @@
 # But this gets hard if my_func is not globl (a static function).
 # In such a case we have:
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  my_func:
 #        [...]
 #        call mcount  (offset: 0x5)
Signature · 1 line
1.6.2.1
#2 lore raw
Quoted 9 lines · Sam Ravnborg
Quoted 7 lines · Tim Abbott

The only references in the kernel to the .text.sched section are in recordmcount.pl. Since the code it has is intended to be example code it should refer to real kernel sections. So change it to .sched.text instead.

Cc Steven Rostedt <[email protected]>
Quoted 6 lines

Steven - this change is independent of the ongoing section rework and is a pure documentation fix.

Please apply it with my ack.

Sam

Will do, Thanks!

-- Steve

Quoted 41 lines

[Kept whole patch for reference]

Quoted 38 lines
---
 scripts/recordmcount.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/recordmcount.pl +3 -3
index 409596e..0fae7da 100755
@@ -26,7 +26,7 @@
 # which will also be the location of that section after final link.
 # e.g.
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  .globl my_func
 #  my_func:
 #        [...]
@@ -39,7 +39,7 @@
 #        [...]
 #
 # Both relocation offsets for the mcounts in the above example will be
-# offset from .text.sched. If we make another file called tmp.s with:
+# offset from .sched.text. If we make another file called tmp.s with:
 #
 #  .section __mcount_loc
 #  .quad  my_func + 0x5
@@ -51,7 +51,7 @@
 # But this gets hard if my_func is not globl (a static function).
 # In such a case we have:
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  my_func:
 #        [...]
 #        call mcount  (offset: 0x5)
Signature · 1 line
1.6.2.1
#3 lore raw

[tip:tracing/core] ftrace: use .sched.text, not .text.sched in recordmcount.pl

In reply to Tim Abbott
Commit-ID:  31b6e76e21b2ffd3cb2f6fe4149790a9fdadce2d
Gitweb:     http://git.kernel.org/tip/31b6e76e21b2ffd3cb2f6fe4149790a9fdadce2d
Author:     Tim Abbott <[email protected]>
AuthorDate: Thu, 30 Apr 2009 20:06:11 -0400
Committer:  Steven Rostedt <[email protected]>
CommitDate: Tue, 5 May 2009 19:17:22 -0400

ftrace: use .sched.text, not .text.sched in recordmcount.pl

The only references in the kernel to the .text.sched section are in recordmcount.pl. Since the code it has is intended to be example code it should refer to real kernel sections. So change it to .sched.text instead.

[ Impact: consistency in comments ]

LKML-Reference: <[email protected]>

---
 scripts/recordmcount.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/recordmcount.pl +3 -3
index 409596e..0fae7da 100755
@@ -26,7 +26,7 @@
 # which will also be the location of that section after final link.
 # e.g.
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  .globl my_func
 #  my_func:
 #        [...]
@@ -39,7 +39,7 @@
 #        [...]
 #
 # Both relocation offsets for the mcounts in the above example will be
-# offset from .text.sched. If we make another file called tmp.s with:
+# offset from .sched.text. If we make another file called tmp.s with:
 #
 #  .section __mcount_loc
 #  .quad  my_func + 0x5
@@ -51,7 +51,7 @@
 # But this gets hard if my_func is not globl (a static function).
 # In such a case we have:
 #
-#  .section ".text.sched"
+#  .section ".sched.text", "ax"
 #  my_func:
 #        [...]
 #        call mcount  (offset: 0x5)