* [PATCH] AArch64 - Add parameter to __mount routine
@ 2013-09-15 12:45 Venkataramanan Kumar
2013-09-16 11:31 ` Marcus Shawcroft
2013-09-24 12:19 ` Marcus Shawcroft
0 siblings, 2 replies; 5+ messages in thread
From: Venkataramanan Kumar @ 2013-09-15 12:45 UTC (permalink / raw)
To: libc-ports; +Cc: Marcus Shawcroft, Patch Tracking, Marcus Shawcroft
[-- Attachment #1: Type: text/plain, Size: 598 bytes --]
Hi Maintainers,
Attached is a small patch which adds a parameter to __mcount routine.
We would like to make the compiler pass the "frompc" address from the function
that calls __mcount during profiling.
ref: http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01556.html
This patch is cross tested in ARMV8 foundation model. No new regressions found.
If it is ok, someone please commit on my behalf.
2013-09-15 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
* sysdeps/aarch64/machine-gmon.h (__mcount): Accept parameter and
pass it to mcount_internal.
regards,
Venkat.
[-- Attachment #2: glibc.gprof.diff --]
[-- Type: application/octet-stream, Size: 1341 bytes --]
diff --git a/ports/sysdeps/aarch64/machine-gmon.h b/ports/sysdeps/aarch64/machine-gmon.h
index 4425965..5cc2941 100644
--- a/ports/sysdeps/aarch64/machine-gmon.h
+++ b/ports/sysdeps/aarch64/machine-gmon.h
@@ -16,10 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-/* GCC version 2 gives us a perfect magical function to get
- just the information we need:
- void *__builtin_return_address (unsigned int N)
- returns the return address of the frame N frames up. */
+/* Accept 'frompc' address as argument from the function that calls
+ __mcount for profiling. Use __builtin_return_address (0)
+ for the 'selfpc' address. */
#include <sysdep.h>
@@ -28,8 +27,8 @@ static void mcount_internal (u_long frompc, u_long selfpc);
#define _MCOUNT_DECL(frompc, selfpc) \
static inline void mcount_internal (u_long frompc, u_long selfpc)
-#define MCOUNT \
-void __mcount (void) \
-{ \
- mcount_internal ((u_long) RETURN_ADDRESS (1), (u_long) RETURN_ADDRESS (0)); \
+#define MCOUNT \
+void __mcount (void *frompc) \
+{ \
+ mcount_internal ((u_long) frompc, (u_long) RETURN_ADDRESS (0)); \
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] AArch64 - Add parameter to __mount routine
2013-09-15 12:45 [PATCH] AArch64 - Add parameter to __mount routine Venkataramanan Kumar
@ 2013-09-16 11:31 ` Marcus Shawcroft
2013-09-16 13:35 ` Venkataramanan Kumar
2013-09-24 12:19 ` Marcus Shawcroft
1 sibling, 1 reply; 5+ messages in thread
From: Marcus Shawcroft @ 2013-09-16 11:31 UTC (permalink / raw)
To: Venkataramanan Kumar; +Cc: libc-ports, Patch Tracking
On 15 September 2013 13:45, Venkataramanan Kumar
<venkataramanan.kumar@linaro.org> wrote:
> Hi Maintainers,
>
> Attached is a small patch which adds a parameter to __mcount routine.
>
> We would like to make the compiler pass the "frompc" address from the function
> that calls __mcount during profiling.
This is an ABI change, however, given that there is no functioning
profiling solution using the existing interface I don't think that
such a change is a problem. Does anyone object?
> ref: http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01556.html
>
> This patch is cross tested in ARMV8 foundation model. No new regressions found.
>
> If it is ok, someone please commit on my behalf.
No regressions is a good start. How did you test the the combined
gcc/glibc patches for profiling are working correctly?
/Marcus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] AArch64 - Add parameter to __mount routine
2013-09-16 11:31 ` Marcus Shawcroft
@ 2013-09-16 13:35 ` Venkataramanan Kumar
0 siblings, 0 replies; 5+ messages in thread
From: Venkataramanan Kumar @ 2013-09-16 13:35 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: libc-ports, Patch Tracking
Hi marcus,
On 16 September 2013 17:01, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:
> On 15 September 2013 13:45, Venkataramanan Kumar
> <venkataramanan.kumar@linaro.org> wrote:
>> Hi Maintainers,
>>
>> Attached is a small patch which adds a parameter to __mcount routine.
>>
>> We would like to make the compiler pass the "frompc" address from the function
>> that calls __mcount during profiling.
>
> This is an ABI change, however, given that there is no functioning
> profiling solution using the existing interface I don't think that
> such a change is a problem. Does anyone object?
>
>> ref: http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01556.html
>>
>> This patch is cross tested in ARMV8 foundation model. No new regressions found.
>>
>> If it is ok, someone please commit on my behalf.
>
> No regressions is a good start. How did you test the the combined
> gcc/glibc patches for profiling are working correctly?
I am cross compiling some simple tests cases and running them under in
ARMV8 model by invoking the runtime linker.
"/work/builds/gcc-fsf-trunk-patch/sysroot-aarch64-unknown-linux-gnu/lib/ld-linux-aarch64.so.1
--library-path /work/builds/gcc-fsf-trunk-patch/sysroot-aarch64-unknown-linux-gnu/lib64
test.out"
Basically do functional testing for these test cases by checking the
available gprof options.
regards,
Venkat,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] AArch64 - Add parameter to __mount routine
2013-09-15 12:45 [PATCH] AArch64 - Add parameter to __mount routine Venkataramanan Kumar
2013-09-16 11:31 ` Marcus Shawcroft
@ 2013-09-24 12:19 ` Marcus Shawcroft
2013-09-24 16:03 ` Joseph S. Myers
1 sibling, 1 reply; 5+ messages in thread
From: Marcus Shawcroft @ 2013-09-24 12:19 UTC (permalink / raw)
To: Venkataramanan Kumar; +Cc: libc-ports, Patch Tracking
On 15 September 2013 13:45, Venkataramanan Kumar
<venkataramanan.kumar@linaro.org> wrote:
> Hi Maintainers,
>
> Attached is a small patch which adds a parameter to __mcount routine.
>
> We would like to make the compiler pass the "frompc" address from the function
> that calls __mcount during profiling.
>
> ref: http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01556.html
>
> This patch is cross tested in ARMV8 foundation model. No new regressions found.
>
> If it is ok, someone please commit on my behalf.
>
> 2013-09-15 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
>
> * sysdeps/aarch64/machine-gmon.h (__mcount): Accept parameter and
> pass it to mcount_internal.
>
> regards,
> Venkat.
Venkat, I've committed your patch.
Thanks /Marcus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] AArch64 - Add parameter to __mount routine
2013-09-24 12:19 ` Marcus Shawcroft
@ 2013-09-24 16:03 ` Joseph S. Myers
0 siblings, 0 replies; 5+ messages in thread
From: Joseph S. Myers @ 2013-09-24 16:03 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: Venkataramanan Kumar, libc-ports, Patch Tracking
On Tue, 24 Sep 2013, Marcus Shawcroft wrote:
> Venkat, I've committed your patch.
Please remember when committing patches for someone else to use git commit
--author="Name <email>" so the patch's author is correctly recorded in the
git logs.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-24 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-15 12:45 [PATCH] AArch64 - Add parameter to __mount routine Venkataramanan Kumar
2013-09-16 11:31 ` Marcus Shawcroft
2013-09-16 13:35 ` Venkataramanan Kumar
2013-09-24 12:19 ` Marcus Shawcroft
2013-09-24 16:03 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).