Summary:
We use `procedure_name` which is coming from `Procname.get_method` in explanation of cost issues. For blocks, procedure name includes a prefix `objc_block` and a suffix with `_x` where x is the block counter. However, displaying this name to the user is not pretty. Especially when we have nested blocks, procedure name looks like `objc_blockobjc_blockdirectUIMessageFromContentAndMetadata_10_23`.
This diff drops the block index suffix and replaces `objc_block` with a prettier version `^`(signifying block).
so instead, in the cost report, we will have `^^blockdirectUIMessageFromContentAndMetadata`.
Reviewed By: skcho
Differential Revision: D26945333
fbshipit-source-id: 9d135423c
master
Ezgi Çiçek4 years agocommitted byFacebook GitHub Bot
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, CallBlocks.take_two_blocks:block1:block2:[objc_blockHandler.create_block_here:array:call:_2^objc_blockHandler.create_block_here:array:call:_3], 0, [Previous Cost of take_two_blocks:block1:block2: is 6 (degree is 0),Updated Cost of take_two_blocks:block1:block2: is 22 + 9 ⋅ (array[create_block_here:array:call:]->elements.length + 1) (degree is 1),{array[create_block_here:array:call:]->elements.length + 1},Call to objc_blockHandler.create_block_here:array:call:_2,Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, Handler.func_linear:, 0, [Previous Cost of func_linear: is 4 + 5 ⋅ (array->elements.length + 1) (degree is 1),{array->elements.length + 1},Loop,Updated Cost of func_linear: is 4 + 3 ⋅ array->elements.length × (array->elements.length + 1) + 8 ⋅ (array->elements.length + 1) + 3 ⋅ (array->elements.length + 1) × (array->elements.length + 1) (degree is 2),{array->elements.length + 1},Loop,{array->elements.length},Call to Handler.loop_linear:,Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, objc_blockHandler.func_linear_1, 0, [Previous Cost of objc_blockHandler.func_linear_1 is 21 (degree is 0),Updated Cost of objc_blockHandler.func_linear_1 is 23 + 3 ⋅ str.length + 3 ⋅ (str.length + 1) (degree is 1),{str.length},Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, objc_blockHandler.func_linear_1, 0, [Previous Cost of ^Handler.func_linear is 21 (degree is 0),Updated Cost of ^Handler.func_linear is 23 + 3 ⋅ str.length + 3 ⋅ (str.length + 1) (degree is 1),{str.length},Loop]