Skip to content

Conversation

@jeromelaban
Copy link
Contributor

@jeromelaban jeromelaban commented Sep 5, 2024

This change adds the support for the log profiler discussed in #107312 for webassembly.

The inclusion follows the support for the browser and aot profilers.

Closes #107312

@ghost ghost added the area-Build-mono label Sep 5, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 5, 2024
@jeromelaban jeromelaban marked this pull request as ready for review September 6, 2024 11:30
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture os-browser Browser variant of arch-wasm area-Diagnostics-mono and removed area-Build-mono labels Sep 6, 2024
Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeromelaban what's the size of libmono-profiler-log.a ?

@jeromelaban
Copy link
Contributor Author

@pavelsavara interestingly, the dotnet.native.wasm seems to be smaller by 20 bytes with the log profiler included.

pavelsavara
pavelsavara previously approved these changes Sep 6, 2024
@pavelsavara
Copy link
Member

adding <WasmProfilers>log;</WasmProfilers> WBT would be great.
Probably to src\mono\wasm\Wasm.Build.Tests\WasmNativeDefaultsTests.cs

Avoid "MSBUILD : error MSB1005: Specify a property and its value."
@pavelsavara
Copy link
Member

From Jerome
image

@pavelsavara
Copy link
Member

pavelsavara commented Sep 13, 2024

There is about 1kb size growth in the range for the default build.

But I can't tell if this is the .wasm file or DLLs. There are other changes in the diff.

image

@radekdoulik could you please advise ?

jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
* feat(wasm): Enable the log profiler

* chore: Disable for wasi

* chore: Add log profiler docs

* chore: Adjust flush logs syntax

* chore: Adjust defines, add conditionals, remove Module dependency

* chore: Adjust buffer_unlock exclusion

* chore: Adjust doc

* chore: Add log profiler sample

* chore: Add more sample logging

* chore: Remove unused makefile target

* chore: Remove icall, use jit interception to take heap sot

* chore: Remove unused logs

* chore: Remove unused dependency

* Revert "chore: Remove unused dependency"

This reverts commit 33221c4.

* remove ENABLE_BROWSER_PROFILER from default build

* Draft of WBT.

* Miss-commit, there's no profiler.js in the sample.

* Shift the responsibility of checking profile's size to the browser.

* Test linking of all 3 types of loggers + running one of them.

* link all 3 at the same time

* fix     [Fact]

* Treat a list of loggers as one argument.

Avoid "MSBUILD : error MSB1005: Specify a property and its value."

* fix?

---------

Co-authored-by: pavelsavara <[email protected]>
Co-authored-by: Ilona Tomkowicz <[email protected]>
Co-authored-by: Ilona Tomkowicz <[email protected]>
Co-authored-by: Pavel Savara <[email protected]>
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
* feat(wasm): Enable the log profiler

* chore: Disable for wasi

* chore: Add log profiler docs

* chore: Adjust flush logs syntax

* chore: Adjust defines, add conditionals, remove Module dependency

* chore: Adjust buffer_unlock exclusion

* chore: Adjust doc

* chore: Add log profiler sample

* chore: Add more sample logging

* chore: Remove unused makefile target

* chore: Remove icall, use jit interception to take heap sot

* chore: Remove unused logs

* chore: Remove unused dependency

* Revert "chore: Remove unused dependency"

This reverts commit 33221c4.

* remove ENABLE_BROWSER_PROFILER from default build

* Draft of WBT.

* Miss-commit, there's no profiler.js in the sample.

* Shift the responsibility of checking profile's size to the browser.

* Test linking of all 3 types of loggers + running one of them.

* link all 3 at the same time

* fix     [Fact]

* Treat a list of loggers as one argument.

Avoid "MSBUILD : error MSB1005: Specify a property and its value."

* fix?

---------

Co-authored-by: pavelsavara <[email protected]>
Co-authored-by: Ilona Tomkowicz <[email protected]>
Co-authored-by: Ilona Tomkowicz <[email protected]>
Co-authored-by: Pavel Savara <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Diagnostics-mono community-contribution Indicates that the PR has been added by a community member os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Wasm] Support for the mono log profiler for memory profiling

5 participants