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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>153466</bug_id>
          
          <creation_ts>2016-01-25 16:46:47 -0800</creation_ts>
          <short_desc>[GTK][EFL] JSC Sampling profiler is not enabled.</short_desc>
          <delta_ts>2016-02-07 17:36:39 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>153638</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>153638</dependson>
          <blocked>153565</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>dpino</cc>
    
    <cc>fpizlo</cc>
    
    <cc>joepeck</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ossy</cc>
    
    <cc>saam</cc>
    
    <cc>wingo</cc>
    
    <cc>ysuzuki</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1158601</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-01-25 16:46:47 -0800</bug_when>
    <thetext>Revision r194840 &lt;http://trac.webkit.org/194840&gt; implemented a Sampling profiler in JSC for the Inspector UI.

This feature is not enabled in the GTK+ port.

There are some layout tests regarding this feature that are timing out on the GTK+ bots.

I&apos;m going to mark such tests as skipped on the GTK+ port.

I&apos;m also opening this bug for anyone interested in enabling and testing this feature on the GTK+ port.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1158640</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-01-25 18:02:21 -0800</bug_when>
    <thetext>Skipped inspector/sampling-profiler tests on https://trac.webkit.org/r195573</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1159482</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-01-27 15:38:52 -0800</bug_when>
    <thetext>I think currently trunk Web Inspector will not be including any JavaScript profiling data in the Timeline without this.

Either the Sampling Profiler needs to be implemented / tests on Linux ports, or Web Inspector needs to fallback to the Legacy Profiler for these ports to get any JavaScript profiling.

Is there someone who might be interested in trying ENABLE(SAMPLING_PROFILER) on Linux ports?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1159701</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-01-28 06:18:20 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Is there someone who might be interested in trying ENABLE(SAMPLING_PROFILER)
&gt; on Linux ports?

I have just tested this patch on top of r195735:


--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -799,7 +799,7 @@
 
 /* The SamplingProfiler is the probabilistic and low-overhead profiler used by
  * JSC to measure where time is spent inside a JavaScript program. */
-#if (OS(DARWIN) || OS(WINDOWS)) &amp;&amp; ENABLE(JIT)
+#if (OS(DARWIN) || OS(LINUX) || OS(WINDOWS)) &amp;&amp; ENABLE(JIT)
 #define ENABLE_SAMPLING_PROFILER 1
 #else
 #define ENABLE_SAMPLING_PROFILER 0


And tried to build the GTK+ port (release). I got this build error:

../../Source/JavaScriptCore/heap/MachineStackMarker.cpp:528:2: error: Need a way to get the frame pointer for another thread on this platform
#error Need a way to get the frame pointer for another thread on this platform
 ^
../../Source/JavaScriptCore/heap/MachineStackMarker.cpp:577:2: error: Need a way to get the instruction pointer for another thread on this platform
#error Need a way to get the instruction pointer for another thread on this platform
 ^
2 errors generated.

Looking at where it fails, it looks this tries to do some OS/arch-specific low-level stuff with the instruction pointers that I&apos;m afraid I won&apos;t have the time and expertise required to fix.

If somebody else is willing to take this, feel free.

Regards.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1159721</commentid>
    <comment_count>4</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-01-28 08:24:42 -0800</bug_when>
    <thetext>I spoke to Yusuke last night on IRC
and he said he&apos;d be willing to help
implement these few functions to make
the sampling profiler work on other
platforms. The only functions that need
to be implemented for it to work are the
ones behind ENABLE(SAMPLING_PROFILER)
guard in heap/MachineStackMarker</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1159809</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-28 11:30:05 -0800</bug_when>
    <thetext>See also: https://lists.webkit.org/pipermail/webkit-dev/2016-January/027888.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1159869</commentid>
    <comment_count>6</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-01-28 13:58:15 -0800</bug_when>
    <thetext>see this patch:
https://bugs.webkit.org/show_bug.cgi?id=153584</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162803</commentid>
    <comment_count>7</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-02-07 17:36:39 -0800</bug_when>
    <thetext>Landed! http://trac.webkit.org/changeset/196245

*** This bug has been marked as a duplicate of bug 153638 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>