Openembedded Core Discussions
 help / color / mirror / Atom feed
* oprofile rebuilds for different MACHINES (sstate)
@ 2015-08-12  3:26 Denys Dmytriyenko
  2015-08-12  4:35 ` Khem Raj
  2015-08-12  5:59 ` Philip Balister
  0 siblings, 2 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2015-08-12  3:26 UTC (permalink / raw)
  To: openembedded-core

So, I've been debugging the issue of oprofile rebuilding from one MACHINE to 
another (causing PR issues, etc). I was able to trace it down to this line:

EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR}  --without-x ac_cv_prog_XSLTPROC="

And STAGING_KERNEL_DIR resolves to this:

STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"

Now, obviously, when MACHINE changes, sstate invalidates do_configure and 
rebuilds oprofile.

The question is, what is the proper fix in this case - mark oprofile as 
machine-specific with PACKAGE_ARCH = "${MACHINE_ARCH}", since it will be 
configuring and building against (potentially) completely different kernel 
tree. So, just mark it explicitly and be safe...

Or another option is to tell sstate to ignore changes to the above variables 
with this simple line:

EXTRA_OECONF[vardepsexclude] = "STAGING_KERNEL_DIR"

This also does the trick, but I'm a bit worried there could be side-effects of 
using oprofile against the wrong kernel... Any recommendations?

-- 
Denys


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: oprofile rebuilds for different MACHINES (sstate)
  2015-08-12  3:26 oprofile rebuilds for different MACHINES (sstate) Denys Dmytriyenko
@ 2015-08-12  4:35 ` Khem Raj
  2015-09-09 22:07   ` Denys Dmytriyenko
  2015-08-12  5:59 ` Philip Balister
  1 sibling, 1 reply; 4+ messages in thread
From: Khem Raj @ 2015-08-12  4:35 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]


> On Aug 11, 2015, at 8:26 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> 
> So, I've been debugging the issue of oprofile rebuilding from one MACHINE to
> another (causing PR issues, etc). I was able to trace it down to this line:
> 
> EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR}  --without-x ac_cv_prog_XSLTPROC="
> 
> And STAGING_KERNEL_DIR resolves to this:
> 
> STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
> 
> Now, obviously, when MACHINE changes, sstate invalidates do_configure and
> rebuilds oprofile.
> 
> The question is, what is the proper fix in this case - mark oprofile as
> machine-specific with PACKAGE_ARCH = "${MACHINE_ARCH}", since it will be
> configuring and building against (potentially) completely different kernel
> tree. So, just mark it explicitly and be safe...
> 
> Or another option is to tell sstate to ignore changes to the above variables
> with this simple line:
> 
> EXTRA_OECONF[vardepsexclude] = "STAGING_KERNEL_DIR"
> 
> This also does the trick, but I'm a bit worried there could be side-effects of
> using oprofile against the wrong kernel... Any recommendations?

Using kernel staging dir is unnecessary here, oprofile’s configure is poking for user space APIs
in linux/perf_event.h so linux-libc-headers dependency is enough. and use —with-kernel=${STAGING_EXECPREFIXDIR}
instead of STAGING_KERNEL_DIR, that should fix it.

-Khem

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: oprofile rebuilds for different MACHINES (sstate)
  2015-08-12  3:26 oprofile rebuilds for different MACHINES (sstate) Denys Dmytriyenko
  2015-08-12  4:35 ` Khem Raj
@ 2015-08-12  5:59 ` Philip Balister
  1 sibling, 0 replies; 4+ messages in thread
From: Philip Balister @ 2015-08-12  5:59 UTC (permalink / raw)
  To: Denys Dmytriyenko, openembedded-core

On 08/12/2015 05:26 AM, Denys Dmytriyenko wrote:
> So, I've been debugging the issue of oprofile rebuilding from one MACHINE to 
> another (causing PR issues, etc). I was able to trace it down to this line:

Why not use perf instead of oprofile?

Philip

> 
> EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR}  --without-x ac_cv_prog_XSLTPROC="
> 
> And STAGING_KERNEL_DIR resolves to this:
> 
> STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
> 
> Now, obviously, when MACHINE changes, sstate invalidates do_configure and 
> rebuilds oprofile.
> 
> The question is, what is the proper fix in this case - mark oprofile as 
> machine-specific with PACKAGE_ARCH = "${MACHINE_ARCH}", since it will be 
> configuring and building against (potentially) completely different kernel 
> tree. So, just mark it explicitly and be safe...
> 
> Or another option is to tell sstate to ignore changes to the above variables 
> with this simple line:
> 
> EXTRA_OECONF[vardepsexclude] = "STAGING_KERNEL_DIR"
> 
> This also does the trick, but I'm a bit worried there could be side-effects of 
> using oprofile against the wrong kernel... Any recommendations?
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: oprofile rebuilds for different MACHINES (sstate)
  2015-08-12  4:35 ` Khem Raj
@ 2015-09-09 22:07   ` Denys Dmytriyenko
  0 siblings, 0 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2015-09-09 22:07 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Tue, Aug 11, 2015 at 09:35:42PM -0700, Khem Raj wrote:
> 
> > On Aug 11, 2015, at 8:26 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> > 
> > So, I've been debugging the issue of oprofile rebuilding from one MACHINE to
> > another (causing PR issues, etc). I was able to trace it down to this line:
> > 
> > EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR}  --without-x ac_cv_prog_XSLTPROC="
> > 
> > And STAGING_KERNEL_DIR resolves to this:
> > 
> > STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
> > 
> > Now, obviously, when MACHINE changes, sstate invalidates do_configure and
> > rebuilds oprofile.
> > 
> > The question is, what is the proper fix in this case - mark oprofile as
> > machine-specific with PACKAGE_ARCH = "${MACHINE_ARCH}", since it will be
> > configuring and building against (potentially) completely different kernel
> > tree. So, just mark it explicitly and be safe...
> > 
> > Or another option is to tell sstate to ignore changes to the above variables
> > with this simple line:
> > 
> > EXTRA_OECONF[vardepsexclude] = "STAGING_KERNEL_DIR"
> > 
> > This also does the trick, but I'm a bit worried there could be side-effects of
> > using oprofile against the wrong kernel... Any recommendations?
> 
> Using kernel staging dir is unnecessary here, oprofile’s configure is poking for user space APIs
> in linux/perf_event.h so linux-libc-headers dependency is enough. and use —with-kernel=${STAGING_EXECPREFIXDIR}
> instead of STAGING_KERNEL_DIR, that should fix it.

Thanks. It didn't seem to help with oprofile, as it changes hashes anyway due 
to the kernel:do_populate_sysroot...

But it did help with cryptodev-tests re-packaging - patch is on the list.

-- 
Denys


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-09 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12  3:26 oprofile rebuilds for different MACHINES (sstate) Denys Dmytriyenko
2015-08-12  4:35 ` Khem Raj
2015-09-09 22:07   ` Denys Dmytriyenko
2015-08-12  5:59 ` Philip Balister

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox