00:42:40  * C-Manquit (Quit: Connection reset by beer)
01:42:03  * CodeWarjoined
01:46:16  * CodeWarquit (Quit: Leaving)
02:05:39  * CodeWarjoined
02:06:16  <CodeWar>I found several blogs about V8 profiling though I ll admit I have a very dumb and basic question
02:06:39  <CodeWar>when we say sampling based profiling, we re not referring to sampling IP at regular intervals right?
02:07:24  <CodeWar>at a high level my question is this, how does the compiler determine what is hot and what is not. Is it a counter per method that the interpreter updates
02:12:00  <CodeWar>never mind found "the tale of two compilers" blog
02:43:05  * CodeWarpart ("Leaving")
03:10:22  * temp01joined
04:08:19  * Net147joined
04:12:12  * Net147quit (Client Quit)
05:06:12  * mritzjoined
05:12:39  * mritzquit (Quit: Computer has gone to sleep.)
06:51:23  * temp01quit (Read error: Connection reset by peer)
06:54:23  * temp01joined
06:57:02  * hij1nxquit (Quit: hij1nx)
06:57:30  * rendarjoined
07:43:33  * nwillemsquit (Ping timeout: 252 seconds)
08:00:47  * joshthecoderjoined
08:05:22  * TheJHjoined
08:12:56  * hij1nxjoined
08:15:02  * hij1nx_joined
08:15:59  * hij1nxquit (Read error: Connection reset by peer)
08:16:00  * hij1nx_changed nick to hij1nx
08:16:54  * TheJHquit (Ping timeout: 240 seconds)
08:19:17  * joshthecoderquit (Quit: Linkinus - http://linkinus.com)
08:20:01  * C-Manjoined
08:21:09  * nwillemsjoined
08:28:31  * nwillemsquit (Ping timeout: 260 seconds)
09:03:39  * TheJHjoined
09:22:29  * decoderquit (Ping timeout: 264 seconds)
09:23:10  * decoderjoined
09:36:43  * [[zzz]]joined
09:39:45  * [[zz]]quit (Ping timeout: 244 seconds)
10:22:14  * hij1nxquit (Quit: hij1nx)
10:36:03  * hij1nxjoined
10:45:13  * hij1nxquit (Quit: hij1nx)
11:11:29  * hij1nxjoined
11:29:43  * [[zzz]]changed nick to [[zz]]
13:11:47  * xan_quit (Quit: leaving)
13:48:55  * hij1nxquit (Quit: hij1nx)
13:51:12  * hij1nxjoined
14:42:33  * jeweljoined
15:41:17  * hij1nxquit (Quit: hij1nx)
15:46:27  * hij1nxjoined
15:47:13  * temp01quit (Read error: Connection reset by peer)
15:49:20  * temp01joined
16:10:00  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
17:17:10  * hij1nxquit (Quit: hij1nx)
17:42:17  * temp01quit (Read error: Connection reset by peer)
18:34:53  * joshthecoderjoined
19:21:55  * jewelquit (Ping timeout: 246 seconds)
20:58:46  * CodeWarjoined
21:48:58  * mralephjoined
22:10:19  <mraleph>CodeWar: we used to use sampling sliding window profiler for determining what to optimize, now we use conters on functions.
22:11:12  <CodeWar>mraleph, compile the counters into optimized code?
22:11:49  <mraleph>why into optimized? on non-optimized
22:12:01  <CodeWar>to know whats not hot anymore,
22:12:05  <CodeWar>err wait this is a method JIT is it?
22:12:09  <mraleph>we don't do that.
22:12:19  <mraleph>yes it's a method jit.
22:12:40  <CodeWar>and I suppose once you decide a method is hot there is no distinction made between a hot trace path within that method?
22:13:52  <mraleph>no we don't see what is hot inside.
22:14:30  <CodeWar>what would trigger a method to be deoptimized? I suppose code cache space is limitted?
22:17:55  <mraleph>deoptimization will happen only if check that guards some assumption inside optimized code fails, or if debugger is enabled (and a minor other cases).
22:18:17  <mraleph>size of code space is limited but no attempt to flush optimized code is currently done.
22:18:22  <CodeWar>got it
22:18:50  <CodeWar>since I ahve your attention, I ran V8 on our cpu simulator and did what I did for Mozilla
22:19:09  <CodeWar>viz., marked all your code pages and heap pages single threaded (mmap (map_threadlocal)) its an extra kernel flag I added some time earlier
22:19:22  <CodeWar>it brings IPI traffic down by 90 % and helps IPC numbers but not sure if its safe
22:20:03  <CodeWar>Question being: is code cache used by a single thread or shared across threads. Is the compiler a foreground compielr or background one? Can GC touch heap/code cache of various threads?
22:21:07  <mraleph>normally V8 is single threaded these days.
22:21:20  <mraleph>unless you use it from different threads.
22:21:46  <CodeWar>didn't follow can you elaborate
22:22:11  <CodeWar>can the code cache be used by two separate threads or will each Javascript Script have its own sandbox used by only one thread
22:23:14  <mraleph>V8 by itself is single threaded (GC, compiler are all performed in the same thread that executes JavaScript) but V8 can be used by two threads (not simultaneously though, they have to maintain exclusive access to V8 isolate).
22:23:56  <CodeWar>[(GC, compiler are all performed in the same thread that executes JavaScript)] .... great good to know
22:25:06  <CodeWar>Nitro Assembler and Mozilla have a scary change coming around called JIT hardening, change code cache permission back to X after code patching and do WX before patching... any idea if V8 intends to do somethign similar
22:25:28  <CodeWar>*scary because* these transitions accompany TLB invalidates and broadcasts and on ARM they are less efficient than x86 (details ...)
22:25:58  <CodeWar>that should have read Webkit Assembler, sorry
22:27:16  <mraleph>I have not seen any changes like that comming into V8. But it's interesting to know. I am quite curious what the penalty is such a change is going to be.
22:27:50  <mraleph>Can you point me to bug numbers or something for SpiderMonkey and JavaScriptCore?
22:28:42  <mraleph>I wonder if using indirect calls is better than meddling with page permissions.
22:29:08  <CodeWar>https://bugzilla.mozilla.org/show_bug.cgi?id=677272
22:29:12  <CodeWar>mraleph, it is
22:29:53  <CodeWar>the define in Webkit's Assembler is currently disabled, I don't have numbers or atleast not ones I can openly share unfortunately
22:30:59  <CodeWar>part of the page meddling part has to do with internal processor trace caches (which are really Trace JITs of predecoded instructions) when you change page protections they have to be blindly discarded
22:31:17  <CodeWar>indirect target prediction for hot code is not too hard in trace cache and there are ITPs too
22:31:45  <mraleph>thanks
22:37:33  <mraleph>I think the bug is assigned to a person who does not work for Mozilla anymore :-)
22:40:31  <CodeWar>yes Chris left a while back though the code is in only the switch needs to be flipped
22:41:12  * mralephquit (Quit: Leaving.)
22:41:32  <CodeWar>we flipped the switch internally fixed some bugs, the perf was atrocious, I guess security triumphs perf. If this is going to be a mainstream browser feature then time for processors to go back and re-add stuff ;-)
22:41:38  * mralephjoined
22:44:20  * rendarquit
22:46:27  * mralephquit (Client Quit)
22:49:04  <CodeWar>any plans for object inlining or object colocation [not sure if it even makes sense in JS, I know Java and get by on JS, sorry :-( ]
22:49:49  <CodeWar>having frequently accessed objects be virtually contiguous makes it easier for hardware prefetchers. Large page support for ARM is almost in its generally good news for the caches and TLBs
23:08:44  * CodeWarquit (Quit: Leaving)
23:12:13  * TheJHquit (Ping timeout: 246 seconds)
23:16:17  * RT|Chatzillajoined