Skip to content

Conversation

@radekdoulik
Copy link
Member

Add conditional throw to the leaf methods to avoid optimizing out the
exception handling code in TryCatch measurement.

Add new NoExceptionHandling measurement to measure case when no
exception handling is involved.

Example measurements, chrome/amd64:

measurement AOT interp
Exceptions, NoExceptionHandling 0.0164us 0.0558us
Exceptions, TryCatch 0.1400us 0.0592us
Exceptions, TryCatchThrow 0.0064ms 0.0028ms
Exceptions, TryCatchFilter 0.4415us 0.0645us
Exceptions, TryCatchFilterInline 0.1263us 0.0527us
Json, non-ASCII text serialize 1.4475ms 8.6952ms
Json, non-ASCII text deserialize 6.5332ms 12.2220ms
Json, small serialize 0.2020ms 0.2362ms
Json, small deserialize 0.2293ms 0.3614ms
Json, large serialize 53.3021ms 68.0000ms
Json, large deserialize 61.5176ms 100.0377ms

Add conditional throw to the leaf methods to avoid optimizing out the
exception handling code in `TryCatch` measurement.

Add new `NoExceptionHandling` measurement to measure case when no
exception handling is involved.

Example measurement, chrome/amd64:

| measurement | AOT | interp |
|-:|-:|-:|
|  Exceptions, NoExceptionHandling |     0.0164us |     0.0558us |
|             Exceptions, TryCatch |     0.1400us |     0.0592us |
|        Exceptions, TryCatchThrow |     0.0064ms |     0.0028ms |
|       Exceptions, TryCatchFilter |     0.4415us |     0.0645us |
| Exceptions, TryCatchFilterInline |     0.1263us |     0.0527us |
|   Json, non-ASCII text serialize |     1.4475ms |     8.6952ms |
| Json, non-ASCII text deserialize |     6.5332ms |    12.2220ms |
|            Json, small serialize |     0.2020ms |     0.2362ms |
|          Json, small deserialize |     0.2293ms |     0.3614ms |
|            Json, large serialize |    53.3021ms |    68.0000ms |
|          Json, large deserialize |    61.5176ms |   100.0377ms |
@radekdoulik radekdoulik added arch-wasm WebAssembly architecture area-Infrastructure labels May 17, 2021
@radekdoulik radekdoulik requested review from BrzVlad, lewing and vargaz May 17, 2021 15:23
@radekdoulik radekdoulik requested a review from marek-safar as a code owner May 17, 2021 15:23
@ghost
Copy link

ghost commented May 17, 2021

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

Add conditional throw to the leaf methods to avoid optimizing out the
exception handling code in TryCatch measurement.

Add new NoExceptionHandling measurement to measure case when no
exception handling is involved.

Example measurements, chrome/amd64:

measurement AOT interp
Exceptions, NoExceptionHandling 0.0164us 0.0558us
Exceptions, TryCatch 0.1400us 0.0592us
Exceptions, TryCatchThrow 0.0064ms 0.0028ms
Exceptions, TryCatchFilter 0.4415us 0.0645us
Exceptions, TryCatchFilterInline 0.1263us 0.0527us
Json, non-ASCII text serialize 1.4475ms 8.6952ms
Json, non-ASCII text deserialize 6.5332ms 12.2220ms
Json, small serialize 0.2020ms 0.2362ms
Json, small deserialize 0.2293ms 0.3614ms
Json, large serialize 53.3021ms 68.0000ms
Json, large deserialize 61.5176ms 100.0377ms
Author: radekdoulik
Assignees: -
Labels:

arch-wasm, area-Infrastructure

Milestone: -

lewing
lewing previously approved these changes May 19, 2021
@lewing lewing dismissed their stale review May 19, 2021 02:22

failure should be looked at

@lewing
Copy link
Member

lewing commented May 20, 2021

Failure is, looks like possibly the GC issue zoltan found.

XHarness command issued: wasm test-browser --app=. --output-directory=/datadisks/disk1/work/B0F70A18/w/9B200893/uploads/xharness-output --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js -- --run WasmTestRunner.dll System.Xml.Linq.xNodeBuilder.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[16:31:20] info: Starting chromedriver with args: --headless --incognito --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-component-extensions-with-background-pages --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-ipc-flooding-protection --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only
Starting ChromeDriver 84.0.4147.0 (ff714bcb10c3356b1b1b2819148507a34fa4b1f8-refs/heads/master@{#768968}) on port 46337
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[16:31:21] info: browser: Console websocket connected.
[16:31:21] info: Arguments: --run,WasmTestRunner.dll,System.Xml.Linq.xNodeBuilder.Tests.dll,-notrait,category=IgnoreForCI,-notrait,category=OuterLoop,-notrait,category=failing
[16:31:22] info: Initializing.....
[16:31:24] info: {"method":"console.error","payload":{},"arguments":[{}]}
[16:31:24] fail: Error: System.NullReferenceException: Object reference not set to an instance of an object.
                    at System.Runtime.InteropServices.JavaScript.Runtime.<>c__DisplayClass27_0.<SetupJSContinuation>g__Complete|0()
                    at System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation(Task task, JSObject continuationObj)
                     at Object._convert_exception_for_method_call (http://127.0.0.1:40335/dotnet.js:1:196142)
                     at Object._handle_exception_for_call (http://127.0.0.1:40335/dotnet.js:1:198111)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:40335/dotnet.js:1:198432)
                     at Object._call_method_with_converted_args (http://127.0.0.1:40335/dotnet.js:1:199506)
                     at Object.call_method (http://127.0.0.1:40335/dotnet.js:1:197901)
                     at Object._unbox_task_rooted (http://127.0.0.1:40335/dotnet.js:1:176957)
                     at Object._unbox_mono_obj_rooted_with_known_nonprimitive_type (http://127.0.0.1:40335/dotnet.js:1:177888)
                     at Object._unbox_mono_obj_root (http://127.0.0.1:40335/dotnet.js:1:179125)
                     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:40335/dotnet.js:1:198552)
                     at Object._call_method_with_converted_args (http://127.0.0.1:40335/dotnet.js:1:199506)
[16:31:24] info: Discovering: System.Xml.Linq.xNodeBuilder.Tests.dll (method display = ClassAndMethod, method display options = None)
[16:31:24] info: Discovered:  System.Xml.Linq.xNodeBuilder.Tests.dll (found 7 of 8 test cases)
[16:31:24] info: Starting:    System.Xml.Linq.xNodeBuilder.Tests.dll
[16:31:24] info: Finished:    System.Xml.Linq.xNodeBuilder.Tests.dll
[16:31:24] info: 
[16:31:24] info: === TEST EXECUTION SUMMARY ===
[16:31:24] info: Total: 19, Errors: 0, Failed: 0, Skipped: 0, Time: 0.228765s
[16:31:24] info: 
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 ""
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "Unhandled Exception:"
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "System.NullReferenceException: Object reference not set to an instance of an object."
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "   at System.Runtime.InteropServices.JavaScript.Runtime.\u003C>c__DisplayClass27_0.\u003CSetupJSContinuation>g__Complete|0()"
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "   at System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation(Task task, JSObject continuationObj)"
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 ""
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "Unhandled Exception:"
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "System.NullReferenceException: Object reference not set to an instance of an object."
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "   at System.Runtime.InteropServices.JavaScript.Runtime.\u003C>c__DisplayClass27_0.\u003CSetupJSContinuation>g__Complete|0()"
[16:31:24] fail: [out of order message from the browser]: http://127.0.0.1:40335/dotnet.js 0:30093 "   at System.Runtime.InteropServices.JavaScript.Runtime.SetupJSContinuation(Task task, JSObject continuationObj)"
[16:31:24] info: WASM EXIT 1
[16:31:24] fail: Application has finished with exit code TESTS_FAILED but 0 was expected
XHarness exit code: 71 (GENERAL_FAILURE)
XHarness artifacts: /datadisks/disk1/work/B0F70A18/w/9B200893/uploads/xharness-output

@radekdoulik radekdoulik merged commit fe8ae98 into dotnet:main May 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants