Bug 1145442 - More jit coach optimization outcome docs. r=shu
authorKannan Vijayan <kvijayan@mozilla.com>
Thu, 10 Sep 2015 14:40:08 -0400
changeset 294449 435a86d7a398b7f20401d7c2dd4d5154784341d9
parent 294448 f63ec3ee07ed9c74dfddae5feab6545f4584731a
child 294450 0efead085a3b3212755cd398a8f77f5847bd1efd
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1145442
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1145442 - More jit coach optimization outcome docs. r=shu
js/src/doc/JITOptimizations/Outcomes.md
--- a/js/src/doc/JITOptimizations/Outcomes.md
+++ b/js/src/doc/JITOptimizations/Outcomes.md
@@ -158,102 +158,318 @@ The observed type of the target of the p
 that it is a SIMD object.
 
 ### AccessNotTypedObject
 
 The observed type of the target of the property access doesn't guarantee
 that it is a TypedObject.
 
 ### AccessNotTypedArray
+
+The observed type of the target of the property access doesn't guarantee
+that it is a TypedArray.
+
 ### AccessNotString
+
+The observed type of the target of the property access doesn't guarantee
+that it is a String.
+
 ### StaticTypedArrayUint32
+
+Typed Arrays of uint32 values are not yet fully optimized.
+
 ### StaticTypedArrayCantComputeMask
 ### OutOfBounds
+
+The element access has been observed to be out of the length bounds of
+the string being accessed.
+
 ### GetElemStringNotCached
+
+IonMonkey does not generate inline caches for element accesses on
+target values which may be strings.
+
 ### NonNativeReceiver
+
+IonMonkey does not generate inline caches for indexed element accesses on
+target values which may be non-native objects (e.g. DOM elements).
+
 ### IndexType
+
+IonMonkey does not generate inline caches for element reads in which
+the keys have never been observed to be a String, Symbol, or Int32.
+
 ### SetElemNonDenseNonTANotCached
 
+IonMonkey only generates inline caches for element accesses which are
+either on dense objects (e.g. dense Arrays), or Typed Arrays.
+
 ### NoSimdJitSupport
 
 Optimization failed because SIMD JIT support was not enabled.
 
 ### SimdTypeNotOptimized
 
 The type observed as being retrieved from this property access did not
 match an optimizable type.
 
 ### UnknownSimdProperty
 
 The property being accessed on the object is not one of the optimizable
 property names.
 
 ### HasCommonInliningPath
 
+Inlining was abandoned because the inlining call path was repeated.  A
+repeated call path is indicative of a potentially mutually recursive
+function call chain.
+
 ### Inlined
+
+Method has been successfully inlined.
+
 ### DOM
+
+Successfully optimized a call to a DOM getter or setter function.
+
 ### Monomorphic
+
+Successfully optimized a guarded monomorphic property access.  This
+property access is about twice as expensive as a definite property access.
+A guarded monomorphic property access is basically a direct memory load
+from an object, guarded by a type or shape check.  In pseucodcode:
+
+    if HiddenType(obj) === CONSTANT_TYPE:
+        return obj[CONSTANT_SLOT_OFFSET]
+    else
+        BAILOUT()
+
 ### Polymorphic
 
+Successfully optimized a guarded polymorphic property access.  This
+property access is similar to a monomorphic property access, except
+that multiple different hidden types have been observed, and each of
+them are being checked for.  In pseudocode:
+
+    if HiddenType(obj) === CONSTANT_TYPE_1:
+        return obj[CONSTANT_SLOT_OFFSET_1]
+    elif HiddenType(obj) === CONSTANT_TYPE_2:
+        return obj[CONSTANT_SLOT_OFFSET_2]
+    ...
+    elif HiddenType(obj) === CONSTANT_TYPE_K:
+        return obj[CONSTANT_SLOT_OFFSET_K]
+    else
+        BAILOUT()
 
 ## Inline Cache Outcomes
 
 Outcomes describing inline cache stubs that were generated.
 
 ### ICOptStub_GenericSuccess
+
+Generic success condition for generating an optimized inline cache stub.
+
 ### ICGetPropStub_ReadSlot
+
+An inline cache property read which loads a value from a known slot
+location within an object.
+
 ### ICGetPropStub_CallGetter
+
+An inline cache property read which calls a getter function.
+
 ### ICGetPropStub_ArrayLength
+
+An inline cache property read which retrieves the length of an array
+object.
+
 ### ICGetPropStub_UnboxedRead
+
+An inline cache property read which retrieves an value from an unboxed
+object.
+
 ### ICGetPropStub_UnboxedReadExpando
+
+An inline cache property read which retrieves an value from the expando
+component of an unboxed object.
+
 ### ICGetPropStub_UnboxedArrayLength
+
+An inline cache property read which retrieves the length of an unboxed
+array object.
+
 ### ICGetPropStub_TypedArrayLength
+
+An inline cache property read which retrieves the length of an typed array
+object.
+
 ### ICGetPropStub_DOMProxyShadowed
+
+An inline cache property read which retrieves a shadowed property from a
+DOM object.  A shadowed property is an inbuilt DOM property that has been
+overwritten by JS code.
+
 ### ICGetPropStub_DOMProxyUnshadowed
+
+An inline cache property read which retrieves an unshadowed property from
+a DOM object.
+
 ### ICGetPropStub_GenericProxy
+
+An inline cache property read which retrieves the property by calling into
+a generic proxy trap.
+
 ### ICGetPropStub_ArgumentsLength
 
+An inline cache property read which reads the length value from an
+arguments object.
+
 ### ICSetPropStub_Slot
+
+An inline cache property write which sets a value to a known slot location
+in an object.
+
 ### ICSetPropStub_GenericProxy
+
+An inline cache property write which sets the value by calling into a
+generic proxy trap.
+
 ### ICSetPropStub_DOMProxyShadowed
+
+An inline cache property write which sets a shadowed property from a DOM
+object.  A shadowed property is an inbuilt DOM property that has been
+overwritten by JS code.
+
 ### ICSetPropStub_DOMProxyUnshadowed
+
+An inline cache property write which sets an unshadowed property on an
+DOM object.
+
 ### ICSetPropStub_CallSetter
+
+An inline cache property write which calls a setter function on an object.
+
 ### ICSetPropStub_AddSlot
+
+An inline cache property write which adds a new slot to an object,
+because the object is known to not have such a property already.
+
 ### ICSetPropStub_SetUnboxed
 
+An inline cache property write which sets an unboxed value on an unboxed
+object.
+
 ### ICGetElemStub_ReadSlot
+
+An inline cache element read which loads a value from a known property
+slot in an object.
+
 ### ICGetElemStub_CallGetter
+
+An inline cache element read which calls a getter function on the object.
+
 ### ICGetElemStub_ReadUnboxed
+
+An inline cache element read which loads an unboxed value from a known
+property slot on an unboxed object.
+
 ### ICGetElemStub_Dense
+
+An inline cache element read which loads an element from a dense array.
+
 ### ICGetElemStub_DenseHole
+
+An inline cache element read which loads an element from a dense array
+which might have a hole.
+
 ### ICGetElemStub_TypedArray
+
+An inline cache element read which loads an element from a typed array.
+
 ### ICGetElemStub_ArgsElement
+
+An inline cache element read which loads an element from an `arguments`
+object.
+
 ### ICGetElemStub_ArgsElementStrict
 
+An inline cache element read which loads an element from an `arguments`
+object in strict mode.
+
 ### ICSetElemStub_Dense
+
+An inline cache element write which sets an element on a dense array.
+
 ### ICSetElemStub_TypedArray
 
+An inline cache element write which sets an element on a typed array.
+
 ### ICNameStub_ReadSlot
+
+An inline cache element which loads a bare variable name from a slot on
+a scope chain object.
+
 ### ICNameStub_CallGetter
 
+An inline cache element which loads a bare variable name by calling a
+getter function on the global object.
+
 ## Call Inlining Outcomes
 
 Optimization outcomes of attempts to inline function calls.
 
 ### CantInlineGeneric
+
+Generic failure-to-inline outcome.
+
 ### CantInlineClassConstructor
+
+Cannot inline a class constructor function.
+
 ### CantInlineExceededDepth
+
+Inlining stopped because inlining depth was exceeded.
+
 ### CantInlineExceededTotalBytecodeLength
+
+Inlining stopped because the total bytecode length of all inlined
+functions exceeded a threshold.
+
 ### CantInlineBigCaller
+
+Inlining was aborted because the caller function is very large.
+
 ### CantInlineBigCallee
+
+Inlining was aborted because the callee function is very large.
+
 ### CantInlineBigCalleeInlinedBytecodeLength
+
+Inlining was aborted because the callee is known to inline a lot of code.
+
 ### CantInlineNotHot
+
+Inlining was aborted because the callee is not hot enough.
+
 ### CantInlineNotInDispatch
+
+This failure mode relates to inlining a method call of the form:
+
+    obj.method()
+
+where a hidden type check on the target object reveals the method to be
+inlined.  If the property access for `method` does not identify
+the method to be inlined, the inlining fails with this code.
+
 ### CantInlineNativeBadType
 
+Inlining attempt of native function was aborted because the hidden
+type for the function, or the result of the function, was not
+compatible with one of the known inline-able native functions.
+
 ### CantInlineNoTarget
 
 Unable to inline function call. The callee (target) function, f in f(x),
 is not known at JIT time.
 
 ### CantInlineNotInterpreted
 
 Unable to inline function call. The callee function is not an interpreted