From: Normand <normand@linux.vnet.ibm.com>
To: xen-devel@lists.xensource.com
Cc: wcohen@redhat.com
Subject: oprofile-0.9.7-xen.patch make oprofile build failure for powerpc
Date: Fri, 14 Mar 2014 07:23:33 +0100 [thread overview]
Message-ID: <5322A065.4060007@linux.vnet.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Trying to build oprofile on fedora that is using the oprofile-0.9.7-xen.patch
the build is failing on ppc64le archi with:
===
gcc -DHAVE_CONFIG_H -I. -I.. -I ../libabi -I ../libutil -I ../libop -I ../libdb -W -Wall -fno-common -Wdeclaration-after-statement -Werror -fno-omit-frame-pointer -O2 -g -fsigned-char -c -o opd_trans.o opd_trans.c
opd_trans.c:270:13: error: 'code_domain_switch' defined but not used [-Werror=unused-function]
static void code_domain_switch(struct transient *trans)
===
I do not know who is in charge to keep this patch updated, but I would suggest to fold it with following attached patch.
--
Michel Normand
[-- Attachment #2: oprofile_no_code_domain_switch.patch --]
[-- Type: text/x-diff, Size: 2299 bytes --]
>From c5c73e871bfe9b0ccbc97cd12ff55a53018ce889 Mon Sep 17 00:00:00 2001
From: Michel Normand <normand@linux.vnet.ibm.com>
Date: Thu, 13 Mar 2014 09:59:18 -0500
Subject: [PATCH] code_domain_switch function not to be defined for powerpc
the code_domain_switch function added by xen patch
is not used in powerpc environment and its presence
make the build to fail.
So add an additionnal patch to not define the function
if powerpc environment.
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
diff --git a/oprofile.opd_trans.not_used_code_domain_switch.patch b/oprofile.opd_trans.not_used_code_domain_switch.patch
new file mode 100644
index 0000000..7ed08d3
--- /dev/null
+++ b/oprofile.opd_trans.not_used_code_domain_switch.patch
@@ -0,0 +1,29 @@
+Subject: oprofile opd_trans.c not using code_domain_switch
+From: Michel Normand <normand@linux.vnet.ibm.com>
+
+The code_domain_switch static function is not used for powerpc env
+so disable it for that environment.
+
+Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
+Index: oprofile-0.9.9/daemon/opd_trans.c
+===================================================================
+--- oprofile-0.9.9.orig/daemon/opd_trans.c
++++ oprofile-0.9.9/daemon/opd_trans.c
+@@ -267,6 +267,7 @@ static void code_xen_enter(struct transi
+ * meaningless for Xen - same reason as for kernel */
+ }
+
++#if ! defined(__powerpc__)
+ static void code_domain_switch(struct transient *trans)
+ {
+ /* While processing passive domain samples we ensure (in_kernel!=0)
+@@ -285,7 +286,8 @@ static void code_domain_switch(struct tr
+ if (current_domain == COORDINATOR_DOMAIN)
+ trans->in_kernel--;
+ }
+-
++#endif
++
+ extern void code_spu_profiling(struct transient * trans);
+ extern void code_spu_ctx_switch(struct transient * trans);
+
diff --git a/oprofile.spec b/oprofile.spec
index e5ccc81..2418604 100644
--- a/oprofile.spec
+++ b/oprofile.spec
@@ -12,6 +12,7 @@ Requires(pre): shadow-utils
Requires(postun): shadow-utils
Patch10: oprofile-0.4-guess2.patch
Patch83: oprofile-0.9.7-xen.patch
+Patch84: oprofile.opd_trans.not_used_code_domain_switch.patch
URL: http://oprofile.sf.net
@@ -76,6 +77,7 @@ agent library.
%setup -q -n %{name}-%{version}
%patch10 -p1 -b .guess2
%patch83 -p1 -b .xen
+%patch84 -p1
./autogen.sh
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
reply other threads:[~2014-03-14 6:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5322A065.4060007@linux.vnet.ibm.com \
--to=normand@linux.vnet.ibm.com \
--cc=wcohen@redhat.com \
--cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.