<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5215</bug_id>
          
          <creation_ts>2013-09-17 11:10:06 +0000</creation_ts>
          <short_desc>qemumips doesn&apos;t have CONFIG_TRACEPOINTS</short_desc>
          <delta_ts>2013-09-25 16:32:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>mips</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36775</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-09-17 11:10:06 +0000</bug_when>
    <thetext>qemumips builds are showing:

WARNING: lttng-modules: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel.

reproducer is &quot;bitbake lttng-modules&quot; for qemumips. I&apos;m assuming this should be enabled on mips and some setting was just overlooked?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36781</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-17 12:51:45 +0000</bug_when>
    <thetext>Tom had already been looking into this, I can&apos;t remember if he found the root cause yet.
If he hasn&apos;t I can likely have a look into it later today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36786</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 13:48:21 +0000</bug_when>
    <thetext>Yeah, I had mentioned this in our kernel meeting a couple weeks ago, and did look a bit into it but got sidetracked again..

Refreshing my memory, basically what I discovered was that CONFIG_TRACEPOINTS wasn&apos;t on because CONFIG_TRACING wasn&apos;t on, and CONFIG_TRACING normally gets turned on by the ftrace feature, but in the mips machines ftrace is disabled:

bsp/mti-malta32/mti-malta32.scc:include features/ftrace/ftrace-disable.scc

I&apos;m not sure why the mips machines disable ftrace, but probably the mips machines need to explicitly enable CONFIG_TRACING.  Probably in general nothing should be counting on CONFIG_TRACING being turned on as a side effect of one feature or another..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36788</commentid>
    <comment_count>3</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 13:50:53 +0000</bug_when>
    <thetext>Oh, here&apos;s the explanation for ftrace-disable in mti-malta32.scc:

# v3.8+ kernels have broken mips dynamic ftrace, disable it completely for now</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36789</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-17 13:51:41 +0000</bug_when>
    <thetext>Ah yes, on the qemu machines, in particular 64 bit mips. ftrace is completely broken and 
causes boot failures due to the dynamic trace point calculations. 

We can try re-enabling it again, but an upstream search for a full fix needs to be done first.

Anyone can try a quick boot test, but during my uprev, I carried the config forward as-is, 
since that was the known good baseline.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36791</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 13:54:16 +0000</bug_when>
    <thetext>We should be able to turn on tracepoints explicitly and forget about ftrace, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36798</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 14:39:34 +0000</bug_when>
    <thetext>I assume it&apos;s not just DYNAMIC_FTRACE that breaks mips?  It&apos;s not turned on explicitly by anything, turning on the function tracer seems to turn it on automatically, but under the assumption that it&apos;s any function tracing that causes problems for mips, adding CONFIG_ENABLE_DEFAULT_TRACERS to mips might do the trick for now..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36804</commentid>
    <comment_count>7</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 15:48:39 +0000</bug_when>
    <thetext>Adding and testing a new tracing/enable-default-tracers.scc to be added after every use of ftrace-disable.scc...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36807</commentid>
    <comment_count>8</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-09-17 16:27:47 +0000</bug_when>
    <thetext>Assigning to Tom as he&apos;s clearly already moving with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36824</commentid>
    <comment_count>9</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 19:46:06 +0000</bug_when>
    <thetext>Actually ONFIG_ENABLE_DEFAULT_TRACERS, CONFIG_TRACEPOINTS, etc can&apos;t be turned on unless CONFIG_FTRACE is turned on.  CONFIG_FTRACE &apos;Tracers&apos; is to &apos;Enable the kernel tracing infrastructure.&apos;, the function tracers and dynamic function tracing apparently causing problems are FUNCTION_TRACER</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36825</commentid>
    <comment_count>10</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-17 19:50:19 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Actually ONFIG_ENABLE_DEFAULT_TRACERS, CONFIG_TRACEPOINTS, etc can&apos;t be
&gt; turned on unless CONFIG_FTRACE is turned on.  CONFIG_FTRACE &apos;Tracers&apos; is to
&gt; &apos;Enable the kernel tracing infrastructure.&apos;, the function tracers and
&gt; dynamic function tracing apparently causing problems are FUNCTION_TRACER

oops hit send before done...

FUNCTION_TRACER Enable the kernel to trace every kernel function. This is done
by using a compiler feature to insert a small, 5-byte No-Operation
instruction at the beginning of every kernel function

and DYNAMIC_FTRACE This option will modify all the calls to function tracing
dynamically (will patch them out of the binary image and
replace them with a No-Op instruction) on boot up.

So we should be able to turn FTRACE on but make sure the above are off.

If that&apos;s ok, I&apos;ll submit a patch for that, otherwise, need more info on if it really is just FTRACE alone that causes the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36826</commentid>
    <comment_count>11</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-17 20:28:15 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; Actually ONFIG_ENABLE_DEFAULT_TRACERS, CONFIG_TRACEPOINTS, etc can&apos;t be
&gt; &gt; turned on unless CONFIG_FTRACE is turned on.  CONFIG_FTRACE &apos;Tracers&apos; is to
&gt; &gt; &apos;Enable the kernel tracing infrastructure.&apos;, the function tracers and
&gt; &gt; dynamic function tracing apparently causing problems are FUNCTION_TRACER
&gt; 
&gt; oops hit send before done...
&gt; 
&gt; FUNCTION_TRACER Enable the kernel to trace every kernel function. This is
&gt; done
&gt; by using a compiler feature to insert a small, 5-byte No-Operation
&gt; instruction at the beginning of every kernel function
&gt; 
&gt; and DYNAMIC_FTRACE This option will modify all the calls to function tracing
&gt; dynamically (will patch them out of the binary image and
&gt; replace them with a No-Op instruction) on boot up.
&gt; 
&gt; So we should be able to turn FTRACE on but make sure the above are off.
&gt; 
&gt; If that&apos;s ok, I&apos;ll submit a patch for that, otherwise, need more info on if
&gt; it really is just FTRACE alone that causes the problem.

That should be fine. A quick boot test will show if it works or not, so if you can 
enable ftrace, and disable dynamic ftrace and still boot, we are good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36833</commentid>
    <comment_count>12</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-18 01:24:23 +0000</bug_when>
    <thetext>Patches sent to linux-yocto ML:

https://lists.yoctoproject.org/pipermail/linux-yocto/2013-September/001005.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37211</commentid>
    <comment_count>13</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-25 16:32:39 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.10/commit/?h=meta&amp;id=3058d8141b8c40dddae3801f852dd85866f50e6d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>