<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 5, 2017, at 8:07 PM, Yusuke SUZUKI <<a href="mailto:utatane.tea@gmail.com" class="">utatane.tea@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 6, 2017 at 10:37 AM, Maciej Stachowiak<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:mjs@apple.com" target="_blank" class="">mjs@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class="">On Jan 5, 2017, at 9:37 AM, Brady Eidson <<a href="mailto:beidson@apple.com" target="_blank" class="">beidson@apple.com</a>> wrote:</div><br class="gmail-m_-8698724453431853117Apple-interchange-newline"><div class=""><div style="word-wrap: break-word;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 5, 2017, at 12:48 AM, Yusuke SUZUKI <<a href="mailto:utatane.tea@gmail.com" target="_blank" class="">utatane.tea@gmail.com</a>> wrote:</div><br class="gmail-m_-8698724453431853117Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 5, 2017 at 5:43 PM, Darin Adler<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:darin@apple.com" target="_blank" class="">darin@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">I understand the appeal of “org.webkit” and structured names but personally I would prefer to read names that look like titles and are made up of words with spaces, like these:<br class=""><br class="">“WebKit: Image Decoder”, rather than “org.webkit.ImageDecoder”.<br class="">“WebKit: JavaScript DFG Compiler” rather than “org.webkit.jsc.DFGCompiler”.<br class=""><br class="">Not sure how well that would generalize to all the different names.<br class=""><br class="">I like the idea of having a smart way of automatically making a shorter name for the platforms that have shorter length limits.<br class=""></blockquote><div class=""><br class=""></div><div class="">One interesting idea I've come up with is that,</div><div class=""><br class=""></div><div class="">1. specifying "org.webkit.ImageDecoder"</div><div class="">2. In Linux, we just use "ImageDecoder" part.</div><div class="">3. In macOS port, we automatically convert it to "WebKit: Image Decoder”</div></div></div></div></div></blockquote><div class=""><br class=""></div><div class=""><div class="">Why do we specify “org.webkit.ImageDecoder” if only the “ImageDecoder” part is ever going to be used?</div></div><div class="">Is that because Windows could use “org.webkit.”?</div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">What about if you just specify "Image Decoder" and we automatically convert that to either "ImageDecoder" or "WebKit: Image Decoder" based on platform thread name limits? Is there any case where we want a prefix other than "WebKit: "?</div></div></div></blockquote><div class=""><br class=""></div><div class="">Yeah. For the prefix case, automatically adding "WebKit: " is fine. The current ToT has the name like "<span style="font-size: 12.8px;" class="">com.apple.IPC.ReceiveQueue".</span></div><div class=""><span style="font-size: 12.8px;" class="">Previously I thought that we may need to convert it to "Apple WebKit:" or something like that.</span></div><div class=""><span style="font-size: 12.8px;" class="">But now, I think simply using "WebKit: IPC Receive Queue" is fine.</span></div><div class=""><br class=""></div><div class="">But I think automatically changing "ImageDecoder" to "Image Decoder" does not work well with long names.</div><div class="">There is a name like "AsynchrnousDisassembler". It is >= 15 characters. "AsynchronousDisas" is not good for Linux.</div><div class="">On the other hand, using "AsyncDisasm" => "WebKit: AsyncDisasm" is not good for macOS.</div><div class="">For macOS, we can choose more readable name like "WebKIt: Asynchronous Disassembler".</div><div class=""><br class=""></div><div class="">So, I think Geoffrey's suggestion works well: using long / short name pairs. Like,</div><div class=""><br class=""></div><div class="">ThreadName { "Asynchronous Disassembler", "AsyncDisasm" } // { const char*, const char* }</div><div class=""><br class=""></div><div class="">// OR, </div><div class="">CREATE_THREAD_NAME("Asynchronous Disassembler", "AsyncDisasm") macro => generating ThreadName("WebKit: Asynchronous Disassembler") on macOS, ThreadName("AsyncDisasm") on Linux</div></div></div></div></div></blockquote><br class=""></div><div>If there's a good set of "short name" and "long name" length limits, it would be cool if we could check the length at compile time, which seems more feasible with the macro.</div><div><br class=""></div><div>Regards,</div><div>Maciej</div><div><br class=""></div></body></html>