Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,15 @@ ep_rt_sample_profiler_enabled (EventPipeEvent *sampling_event)
// no-op
}

static
inline
void
ep_rt_sample_profiler_session_enabled (void)
{
STATIC_CONTRACT_NOTHROW;
// no-op
}

static
inline
void
Expand Down
9 changes: 9 additions & 0 deletions src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,15 @@ ep_rt_sample_profiler_enabled (EventPipeEvent *sampling_event)
// no-op
}

static
inline
void
ep_rt_sample_profiler_session_enabled (void)
{
STATIC_CONTRACT_NOTHROW;
// no-op
}

static
inline
void
Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/browser.proj
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
<PInvokeTableFile>$(ArtifactsObjDir)wasm/pinvoke-table.h</PInvokeTableFile>
<InterpToNativeTableFile>$(ArtifactsObjDir)wasm/wasm_m2n_invoke.g.h</InterpToNativeTableFile>

<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Debug'">-g -Os -DDEBUG=1 -DENABLE_AOT_PROFILER=1 -DENABLE_BROWSER_PROFILER=1 -DENABLE_LOG_PROFILER=1</CMakeConfigurationEmccFlags>
<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Debug'">-g -Os -DDEBUG=1</CMakeConfigurationEmccFlags>
<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Release'">-Oz</CMakeConfigurationEmccFlags>

<CMakeConfigurationLinkFlags Condition="'$(Configuration)' == 'Debug'" >$(CMakeConfigurationEmccFlags) -s ASSERTIONS=1 </CMakeConfigurationLinkFlags>
Expand Down
14 changes: 11 additions & 3 deletions src/mono/browser/build/BrowserWasmApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
<Error Condition="'$(InvariantGlobalization)' != 'true' and '$(WasmIncludeFullIcuData)' != 'true' and '$(WasmIcuDataFileName)' != '' and !Exists('$(_WasmIcuDataFileName)')" Text="File in location %24(WasmIcuDataFileName)=$(WasmIcuDataFileName) cannot be found neither when used as absolute path nor a relative runtime pack path. You might want to pass one of the values: @(_IcuAvailableDataFiles->'%(Filename)')."/>
<Error Condition="'$(InvariantGlobalization)' != 'true' and '$(WasmIncludeFullIcuData)' != 'true' and '$(WasmIcuDataFileName)' != '' and !$([System.IO.Path]::GetFileName('$(WasmIcuDataFileName)').StartsWith('icudt'))" Text="Custom ICU file name in path %24(WasmIcuDataFileName)=$(WasmIcuDataFileName) must start with 'icudt'."/>
<Error Condition="'$(WasmProfilers)' != '' and '$(WasmPerfTracing)' != 'false'" Text="%24(WasmProfilers)=$(WasmProfilers) is not supported together with %24(WasmPerfTracing)=$(WasmPerfTracing)"/>
<Error Condition="'$(WasmProfilers)' != '' and '$(WasmPerfInstrumentation)' != ''" Text="%24(WasmProfilers)=$(WasmProfilers) is not supported together with %24(WasmPerfInstrumentation)=$(WasmPerfInstrumentation)"/>
<Error Condition="'$(WasmPerfInstrumentation)' != '' and '$(WasmPerfTracing)' == ''" Text="%24(WasmPerfInstrumentation)=$(WasmPerfInstrumentation) is only supported together with %24(WasmPerfTracing)=true"/>
</Target>

<Target Name="_WasmGenerateAppBundle"
Expand All @@ -148,7 +150,6 @@
<WasmExtraFilesToDeploy Include="$(WasmMainHTMLPath)" Condition="'$(WasmMainHTMLPath)' != ''" />
<WasmExtraFilesToDeploy Include="$(WasmMainJSPath)" Condition="'$(WasmMainJSPath)' != ''" />
<WasmEnvironmentVariable Include="DOTNET_DiagnosticPorts" Value="$(DiagnosticPorts)" Condition="'$(DiagnosticPorts)' != ''"/>
<WasmEnvironmentVariable Include="DOTNET_WasmPerfInstrumentation" Value="1" Condition="'$(WasmPerfInstrumentation)' == 'true'"/>
</ItemGroup>

<RemoveDir Directories="$(WasmAppDir)" />
Expand All @@ -168,6 +169,7 @@
ExtraFilesToDeploy="@(WasmExtraFilesToDeploy)"
ExtraConfig="@(WasmExtraConfig)"
EnvVariables="@(WasmEnvironmentVariable)"
Profilers="$(_WasmProfilers)"
NativeAssets="@(WasmNativeAsset)"
DebugLevel="$(WasmDebugLevel)"
IsPublish="$(_WasmIsPublishing)"
Expand Down Expand Up @@ -307,6 +309,12 @@
<WasmClang>$(EmscriptenUpstreamEmscriptenPath)emcc</WasmClang>
</PropertyGroup>

<ItemGroup >
<_WasmNativeFileForLinking Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)libmono-profiler-aot.a" Condition="$(_WasmProfilers.Contains('aot'))" />
<_WasmNativeFileForLinking Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)libmono-profiler-browser.a" Condition="$(_WasmProfilers.Contains('browser'))" />
<_WasmNativeFileForLinking Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)libmono-profiler-log.a" Condition="$(_WasmProfilers.Contains('log'))" />
</ItemGroup>

<ItemGroup>
<_WasmLinkDependencies Remove="@(_WasmLinkDependencies)" />

Expand All @@ -333,7 +341,7 @@
<_EmccCFlags Include="-DINVARIANT_TIMEZONE=1" Condition="'$(InvariantTimezone)' == 'true'" />
<_EmccCFlags Include="-DLINK_ICALLS=1" Condition="'$(WasmLinkIcalls)' == 'true'" />
<_EmccCFlags Include="-DENABLE_AOT_PROFILER=1" Condition="$(WasmProfilers.Contains('aot'))" />
<_EmccCFlags Include="-DENABLE_BROWSER_PROFILER=1" Condition="$(WasmProfilers.Contains('browser'))" />
<_EmccCFlags Include="-DENABLE_DEVTOOLS_PROFILER=1" Condition="$(WasmProfilers.Contains('browser'))" />
<_EmccCFlags Include="-DENABLE_LOG_PROFILER=1" Condition="$(WasmProfilers.Contains('log'))" />
<_EmccCFlags Include="-DENABLE_JS_INTEROP_BY_VALUE=1" Condition="'$(WasmEnableJsInteropByValue)' == 'true'" />

Expand Down Expand Up @@ -391,7 +399,7 @@
<EmscriptenEnvVars Include="WASM_ENABLE_EH=1" Condition="'$(WasmEnableExceptionHandling)' != 'false'" />
<EmscriptenEnvVars Include="WASM_ENABLE_EH=0" Condition="'$(WasmEnableExceptionHandling)' == 'false'" />
<EmscriptenEnvVars Include="ENABLE_AOT_PROFILER=$([System.Convert]::ToInt32($(WasmProfilers.Contains('aot'))))" />
<EmscriptenEnvVars Include="ENABLE_BROWSER_PROFILER=$([System.Convert]::ToInt32($(WasmProfilers.Contains('browser'))))" />
<EmscriptenEnvVars Include="ENABLE_DEVTOOLS_PROFILER=$([System.Convert]::ToInt32($(WasmProfilers.Contains('browser'))))" />
<EmscriptenEnvVars Include="ENABLE_LOG_PROFILER=$([System.Convert]::ToInt32($(WasmProfilers.Contains('log'))))" />
<EmscriptenEnvVars Include="RUN_AOT_COMPILATION=1" Condition="'$(RunAOTCompilation)' == 'true'" />
<EmscriptenEnvVars Include="RUN_AOT_COMPILATION=0" Condition="'$(RunAOTCompilation)' != 'true'" />
Expand Down
3 changes: 0 additions & 3 deletions src/mono/browser/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ target_link_libraries(dotnet.native
${MONO_ARTIFACTS_DIR}/libmono-icall-table.a
${MONO_ARTIFACTS_DIR}/libmono-wasm-eh-js.a
${MONO_ARTIFACTS_DIR}/libmono-wasm-${CONFIGURATION_INTERPSIMDTABLES_LIB}.a
${MONO_ARTIFACTS_DIR}/libmono-profiler-aot.a
${MONO_ARTIFACTS_DIR}/libmono-profiler-browser.a
${MONO_ARTIFACTS_DIR}/libmono-profiler-log.a
${NATIVE_BIN_DIR}/wasm-bundled-timezones.a
${NATIVE_BIN_DIR}/libSystem.Native.a
${NATIVE_BIN_DIR}/libSystem.Globalization.Native.a
Expand Down
10 changes: 5 additions & 5 deletions src/mono/browser/runtime/cwraps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const fn_signatures: SigLine[] = [
[true, "mono_wasm_set_main_args", "void", ["number", "number"]],
// These three need to be lazy because they may be missing
[() => !runtimeHelpers.emscriptenBuildOptions.enableAotProfiler, "mono_wasm_profiler_init_aot", "void", ["string"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler, "mono_wasm_profiler_init_browser", "void", ["string"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler, "mono_wasm_profiler_init_browser_devtools", "void", ["string"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enableLogProfiler, "mono_wasm_profiler_init_log", "void", ["string"]],
[false, "mono_wasm_exec_regression", "number", ["number", "string"]],
[false, "mono_wasm_invoke_jsexport", "void", ["number", "number"]],
Expand Down Expand Up @@ -130,9 +130,9 @@ const fn_signatures: SigLine[] = [
[true, "mono_jiterp_end_catch", "void", []],
[true, "mono_interp_pgo_load_table", "number", ["number", "number"]],
[true, "mono_interp_pgo_save_table", "number", ["number", "number"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enablePerfTracing && !runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler, "mono_jiterp_prof_enter", "void", ["number", "number"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enablePerfTracing && !runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler, "mono_jiterp_prof_samplepoint", "void", ["number", "number"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enablePerfTracing && !runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler, "mono_jiterp_prof_leave", "void", ["number", "number"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enablePerfTracing && !runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler, "mono_jiterp_prof_enter", "void", ["number", "number"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enablePerfTracing && !runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler, "mono_jiterp_prof_samplepoint", "void", ["number", "number"]],
[() => !runtimeHelpers.emscriptenBuildOptions.enablePerfTracing && !runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler, "mono_jiterp_prof_leave", "void", ["number", "number"]],

...threading_cwraps,
];
Expand All @@ -153,7 +153,7 @@ export interface t_ThreadingCwraps {

export interface t_ProfilerCwraps {
mono_wasm_profiler_init_aot(desc: string): void;
mono_wasm_profiler_init_browser(desc: string): void;
mono_wasm_profiler_init_browser_devtools(desc: string): void;
mono_wasm_profiler_init_log(desc: string): void;
}

Expand Down
9 changes: 2 additions & 7 deletions src/mono/browser/runtime/diagnostics/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

import type { GlobalObjects, MonoMethod } from "../types/internal";
import type { GlobalObjects } from "../types/internal";
import type { CharPtr, VoidPtr } from "../types/emscripten";

import { diagnosticHelpers, runtimeHelpers, setRuntimeGlobalsImpl } from "./globals";
import { diagnosticHelpers, setRuntimeGlobalsImpl } from "./globals";

/* eslint-disable @typescript-eslint/no-unused-vars */
export function setRuntimeGlobals (globalObjects: GlobalObjects): void {
Expand Down Expand Up @@ -34,9 +34,4 @@ export function setRuntimeGlobals (globalObjects: GlobalObjects): void {
// Not implemented yet
return 0;
};
runtimeHelpers.mono_wasm_instrument_method = (method: MonoMethod): number => {
const environmentVariables = runtimeHelpers.config.environmentVariables || {};
const value = environmentVariables["DOTNET_WasmPerfInstrumentation"];
return (value == "1" || value == "true") ? 1 : 0;
};
}
12 changes: 6 additions & 6 deletions src/mono/browser/runtime/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,14 @@ mono_wasm_profiler_init_aot (const char *desc)

#endif

#ifdef ENABLE_BROWSER_PROFILER
#ifdef ENABLE_DEVTOOLS_PROFILER

void mono_profiler_init_browser (const char *desc);
void mono_profiler_init_browser_devtools (const char *desc);

EMSCRIPTEN_KEEPALIVE void
mono_wasm_profiler_init_browser (const char *desc)
mono_wasm_profiler_init_browser_devtools (const char *desc)
{
mono_profiler_init_browser (desc);
mono_profiler_init_browser_devtools (desc);
}

#endif
Expand Down Expand Up @@ -518,8 +518,8 @@ EMSCRIPTEN_KEEPALIVE int mono_wasm_f64_to_i52 (int64_t *destination, double valu
}

// JS is responsible for freeing this
EMSCRIPTEN_KEEPALIVE const char * mono_wasm_method_get_full_name (MonoMethod *method) {
const char *res;
EMSCRIPTEN_KEEPALIVE char * mono_wasm_method_get_full_name (MonoMethod *method) {
char *res;
MONO_ENTER_GC_UNSAFE;
res = mono_method_get_full_name (method);
MONO_EXIT_GC_UNSAFE;
Expand Down
4 changes: 2 additions & 2 deletions src/mono/browser/runtime/es6/dotnet.es6.lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const WASM_ENABLE_SIMD = process.env.WASM_ENABLE_SIMD === "1";
const WASM_PERFTRACING = process.env.WASM_PERFTRACING === "1";
const WASM_ENABLE_EH = process.env.WASM_ENABLE_EH === "1";
const ENABLE_BROWSER_PROFILER = process.env.ENABLE_BROWSER_PROFILER === "1";
const ENABLE_DEVTOOLS_PROFILER = process.env.ENABLE_DEVTOOLS_PROFILER === "1";
const ENABLE_AOT_PROFILER = process.env.ENABLE_AOT_PROFILER === "1";
const ENABLE_LOG_PROFILER = process.env.ENABLE_LOG_PROFILER === "1";
const RUN_AOT_COMPILATION = process.env.RUN_AOT_COMPILATION === "1";
Expand Down Expand Up @@ -87,7 +87,7 @@ function injectDependencies() {
`wasmEnableSIMD: ${WASM_ENABLE_SIMD},` +
`wasmEnableEH: ${WASM_ENABLE_EH},` +
`enableAotProfiler: ${ENABLE_AOT_PROFILER}, ` +
`enableBrowserProfiler: ${ENABLE_BROWSER_PROFILER}, ` +
`enableDevToolsProfiler: ${ENABLE_DEVTOOLS_PROFILER}, ` +
`enableLogProfiler: ${ENABLE_LOG_PROFILER}, ` +
`enablePerfTracing: ${WASM_PERFTRACING}, ` +
`runAOTCompilation: ${RUN_AOT_COMPILATION}, ` +
Expand Down
3 changes: 1 addition & 2 deletions src/mono/browser/runtime/exports-binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { mono_wasm_dump_threads } from "./pthreads/ui-thread";
import { mono_wasm_schedule_synchronization_context } from "./pthreads/shared";
import { mono_wasm_get_locale_info } from "./globalization-locale";

import { mono_wasm_profiler_record, mono_wasm_profiler_now, mono_wasm_instrument_method } from "./profiler";
import { mono_wasm_profiler_record, mono_wasm_profiler_now } from "./profiler";
import { ds_rt_websocket_create, ds_rt_websocket_send, ds_rt_websocket_poll, ds_rt_websocket_recv, ds_rt_websocket_close } from "./diagnostics";

// the JS methods would be visible to EMCC linker and become imports of the WASM module
Expand Down Expand Up @@ -73,7 +73,6 @@ export const mono_wasm_imports = [
mono_wasm_free_method_data,

// browser.c, ep-rt-mono-runtime-provider.c
mono_wasm_instrument_method,
mono_wasm_profiler_now,
mono_wasm_profiler_record,

Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/runtime/exports-internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function cwraps_internal (internal: any): void {
Object.assign(internal, {
mono_wasm_exit: cwraps.mono_wasm_exit,
mono_wasm_profiler_init_aot: profiler_c_functions.mono_wasm_profiler_init_aot,
mono_wasm_profiler_init_browser: profiler_c_functions.mono_wasm_profiler_init_browser,
mono_wasm_profiler_init_browser_devtools: profiler_c_functions.mono_wasm_profiler_init_browser_devtools,
mono_wasm_exec_regression: cwraps.mono_wasm_exec_regression,
mono_wasm_print_thread_dump: WasmEnableThreads ? twraps.mono_wasm_print_thread_dump : undefined,
});
Expand Down
4 changes: 2 additions & 2 deletions src/mono/browser/runtime/jiterpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function getTraceImports () {
if (nullCheckValidation)
traceImports.push(importDef("notnull", assert_not_null));

if (runtimeHelpers.emscriptenBuildOptions.enablePerfTracing || runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler) {
if (runtimeHelpers.emscriptenBuildOptions.enablePerfTracing || runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler) {
traceImports.push(importDef("prof_enter", getRawCwrap("mono_jiterp_prof_enter")));
traceImports.push(importDef("prof_samplepoint", getRawCwrap("mono_jiterp_prof_samplepoint")));
traceImports.push(importDef("prof_leave", getRawCwrap("mono_jiterp_prof_leave")));
Expand Down Expand Up @@ -1084,7 +1084,7 @@ export function mono_interp_tier_prepare_jiterpreter (
export function mono_wasm_free_method_data (
method: MonoMethod, imethod: number, traceIndex: number
) {
if (runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler) {
if (runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler) {
mono_wasm_profiler_free_method(method);
}

Expand Down
4 changes: 0 additions & 4 deletions src/mono/browser/runtime/loader/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@ export function normalizeConfig () {
runtimeHelpers.diagnosticTracing = loaderHelpers.diagnosticTracing = !!config.diagnosticTracing;
runtimeHelpers.waitForDebugger = config.waitForDebugger;

runtimeHelpers.enablePerfMeasure = !!config.browserProfilerOptions
&& globalThis.performance
&& typeof globalThis.performance.measure === "function";

loaderHelpers.maxParallelDownloads = config.maxParallelDownloads || loaderHelpers.maxParallelDownloads;
loaderHelpers.enableDownloadRetry = config.enableDownloadRetry !== undefined ? config.enableDownloadRetry : loaderHelpers.enableDownloadRetry;
}
Expand Down
28 changes: 9 additions & 19 deletions src/mono/browser/runtime/profiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

import { ENVIRONMENT_IS_WEB, mono_assert, runtimeHelpers } from "./globals";
import { MonoMethod, AOTProfilerOptions, BrowserProfilerOptions, LogProfilerOptions } from "./types/internal";
import { MonoMethod, AOTProfilerOptions, LogProfilerOptions } from "./types/internal";
import { profiler_c_functions as cwraps } from "./cwraps";
import { utf8ToString } from "./strings";
import { free } from "./memory";
Expand All @@ -27,18 +27,11 @@ export function mono_wasm_init_aot_profiler (options: AOTProfilerOptions): void
cwraps.mono_wasm_profiler_init_aot(arg);
}

export function mono_wasm_init_browser_profiler (options: BrowserProfilerOptions): void {
mono_assert(runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler, "Browser profiler is not enabled, please use <WasmProfilers>browser;</WasmProfilers> in your project file.");
if (options == null)
options = {};
let arg = "browser:";
if (typeof options.callSpec === "string") {
arg += `callspec=${options.callSpec},`;
}
if (typeof options.sampleIntervalMs === "number") {
arg += `interval=${options.sampleIntervalMs},`;
}
cwraps.mono_wasm_profiler_init_browser(arg);
export function mono_wasm_init_devtools_profiler (): void {
mono_assert(runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler, "DevTools profiler is not enabled, please use <WasmProfilers>browser:callspec=N:Sample</WasmProfilers> in your project file.");
enablePerfMeasure = globalThis.performance && typeof globalThis.performance.measure === "function";
const desc = `${runtimeHelpers.config.environmentVariables!["DOTNET_WasmPerfInstrumentation"] || "callspec=all"}`;
cwraps.mono_wasm_profiler_init_browser_devtools(desc);
}

export function mono_wasm_init_log_profiler (options: LogProfilerOptions): void {
Expand Down Expand Up @@ -78,16 +71,17 @@ export const enum MeasuredBlock {
export type TimeStamp = {
__brand: "TimeStamp"
}
let enablePerfMeasure = false;

export function startMeasure (): TimeStamp {
if (runtimeHelpers.enablePerfMeasure) {
if (enablePerfMeasure) {
return globalThis.performance.now() as any;
}
return undefined as any;
}

export function endMeasure (start: TimeStamp, block: string, id?: string) {
if (runtimeHelpers.enablePerfMeasure && start) {
if (enablePerfMeasure && start) {
// API is slightly different between web and Nodejs
const options = ENVIRONMENT_IS_WEB
? { start: start as any }
Expand Down Expand Up @@ -119,7 +113,3 @@ export function mono_wasm_profiler_record (method: MonoMethod, start: number): v
}
globalThis.performance.measure(methodName, options);
}

export function mono_wasm_instrument_method (method:MonoMethod):number {
return runtimeHelpers.mono_wasm_instrument_method(method);
}
6 changes: 3 additions & 3 deletions src/mono/browser/runtime/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { exportedRuntimeAPI, INTERNAL, loaderHelpers, Module, runtimeHelpers, cr
import cwraps, { init_c_exports, threads_c_functions as tcwraps } from "./cwraps";
import { mono_wasm_raise_debug_event, mono_wasm_runtime_ready } from "./debug";
import { toBase64StringImpl } from "./base64";
import { mono_wasm_init_aot_profiler, mono_wasm_init_browser_profiler, mono_wasm_init_log_profiler } from "./profiler";
import { mono_wasm_init_aot_profiler, mono_wasm_init_devtools_profiler, mono_wasm_init_log_profiler } from "./profiler";
import { initialize_marshalers_to_cs } from "./marshal-to-cs";
import { initialize_marshalers_to_js } from "./marshal-to-js";
import { init_polyfills_async } from "./polyfills";
Expand Down Expand Up @@ -547,8 +547,8 @@ export async function start_runtime () {
}
} else if (runtimeHelpers.emscriptenBuildOptions.enableAotProfiler) {
mono_wasm_init_aot_profiler(runtimeHelpers.config.aotProfilerOptions || {});
} else if (runtimeHelpers.emscriptenBuildOptions.enableBrowserProfiler) {
mono_wasm_init_browser_profiler(runtimeHelpers.config.browserProfilerOptions || {});
} else if (runtimeHelpers.emscriptenBuildOptions.enableDevToolsProfiler) {
mono_wasm_init_devtools_profiler();
} else if (runtimeHelpers.emscriptenBuildOptions.enableLogProfiler) {
mono_wasm_init_log_profiler(runtimeHelpers.config.logProfilerOptions || {});
}
Expand Down
Loading
Loading