<?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>166663</bug_id>
          
          <creation_ts>2017-01-03 14:22:40 -0800</creation_ts>
          <short_desc>Use prctl to name thread on Linux</short_desc>
          <delta_ts>2017-01-04 01:44:32 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>166676</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>benjamin</cc>
    
    <cc>cdumez</cc>
    
    <cc>cgarcia</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1263547</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-03 14:22:40 -0800</bug_when>
    <thetext>Use prctl to name thread on Linux</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263548</commentid>
    <comment_count>1</comment_count>
      <attachid>297953</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-03 14:24:00 -0800</bug_when>
    <thetext>Created attachment 297953
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263580</commentid>
    <comment_count>2</comment_count>
      <attachid>297953</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-01-03 15:26:16 -0800</bug_when>
    <thetext>Comment on attachment 297953
Patch

OK, I don&apos;t see why not. Did you do this to help Carlos keep track of which thread is the main thread? :D

What do our thread names look like? I see from prctl(2) that they are truncated to 16 characters; I wonder if our names are often longer than that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263701</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-03 23:37:58 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 297953 [details]
&gt; Patch
&gt; 
&gt; OK, I don&apos;t see why not. Did you do this to help Carlos keep track of which
&gt; thread is the main thread? :D
&gt; 
&gt; What do our thread names look like? I see from prctl(2) that they are
&gt; truncated to 16 characters; I wonder if our names are often longer than that?

Yeah, characters are truncated. The typical form is like,

jsc.watchdog.queue
org.webkit.ThreadedCompositorWorkQueue

So I think we should retrieve trailing 16 characters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263712</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-04 00:27:04 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; Comment on attachment 297953 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; OK, I don&apos;t see why not. Did you do this to help Carlos keep track of which
&gt; &gt; thread is the main thread? :D
&gt; &gt; 
&gt; &gt; What do our thread names look like? I see from prctl(2) that they are
&gt; &gt; truncated to 16 characters; I wonder if our names are often longer than that?
&gt; 
&gt; Yeah, characters are truncated. The typical form is like,
&gt; 
&gt; jsc.watchdog.queue
&gt; org.webkit.ThreadedCompositorWorkQueue
&gt; 
&gt; So I think we should retrieve trailing 16 characters.

I&apos;ll just port WorkQueue::platformInitialize&apos;s threadName handling.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263713</commentid>
    <comment_count>5</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-04 00:27:57 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; Comment on attachment 297953 [details]
&gt; &gt; &gt; Patch
&gt; &gt; &gt; 
&gt; &gt; &gt; OK, I don&apos;t see why not. Did you do this to help Carlos keep track of which
&gt; &gt; &gt; thread is the main thread? :D
&gt; &gt; &gt; 
&gt; &gt; &gt; What do our thread names look like? I see from prctl(2) that they are
&gt; &gt; &gt; truncated to 16 characters; I wonder if our names are often longer than that?
&gt; &gt; 
&gt; &gt; Yeah, characters are truncated. The typical form is like,
&gt; &gt; 
&gt; &gt; jsc.watchdog.queue
&gt; &gt; org.webkit.ThreadedCompositorWorkQueue
&gt; &gt; 
&gt; &gt; So I think we should retrieve trailing 16 characters.
&gt; 
&gt; I&apos;ll just port WorkQueue::platformInitialize&apos;s threadName handling.

I&apos;ll do that in different patch :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263716</commentid>
    <comment_count>6</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-04 00:30:52 -0800</bug_when>
    <thetext>Committed r210272: &lt;http://trac.webkit.org/changeset/210272&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263731</commentid>
    <comment_count>7</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-01-04 01:44:32 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 297953 [details]
&gt; Patch
&gt; 
&gt; OK, I don&apos;t see why not. Did you do this to help Carlos keep track of which
&gt; thread is the main thread? :D
&gt; 
&gt; What do our thread names look like? I see from prctl(2) that they are
&gt; truncated to 16 characters; I wonder if our names are often longer than that?

I found it when debugging WorkQueue thing.
I&apos;m super happy if it would help Carlos :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>297953</attachid>
            <date>2017-01-03 14:24:00 -0800</date>
            <delta_ts>2017-01-03 15:26:16 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-166663-20170104072235.patch</filename>
            <type>text/plain</type>
            <size>1466</size>
            <attacher name="Yusuke Suzuki">ysuzuki</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjEwMjQ1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV1RGL0NoYW5n
ZUxvZyBiL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCmluZGV4IDBkMjMyZjllNGQ5NjU0Njg2Y2M3NjNh
YTg5MGRjMzFiY2UzY2IyM2YuLmNlZTY4NDMzYzQxMzIyNDc3YThjNjVlMTYzOTQzMTVjYmRlNzVk
N2MgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XVEYvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTctMDEtMDMgIFl1c3VrZSBTdXp1a2kgIDx1dGF0
YW5lLnRlYUBnbWFpbC5jb20+CisKKyAgICAgICAgVXNlIHByY3RsIHRvIG5hbWUgdGhyZWFkIG9u
IExpbnV4CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0x
NjY2NjMKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBJ
dCBpcyBxdWl0ZSB1c2VmdWwgaWYgd2UgY2FuIG5hbWUgdGhyZWFkcy4gVGhpcyBuYW1lIHdpbGwg
YmUgc2hvd24gaW4gR0RCLgorICAgICAgICBXaGlsZSBtYWNPUyB1c2VzIHB0aHJlYWRfc2V0bmFt
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TmFtZSk7Cisj
ZWxpZiBPUyhMSU5VWCkKKyAgICBwcmN0bChQUl9TRVRfTkFNRSwgdGhyZWFkTmFtZSk7CiAjZWxz
ZQogICAgIFVOVVNFRF9QQVJBTSh0aHJlYWROYW1lKTsKICNlbmRpZgo=
</data>
<flag name="review"
          id="320210"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>