Skip to content
Closed
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
15 changes: 11 additions & 4 deletions src/monodroid/jni/monodroid-glue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1623,10 +1623,11 @@ MonodroidRuntime::set_profile_options ()
value.assign (prop_value);
}

// NET+ supports only the AOT Mono profiler, if the prefix is absent or different than 'aot:' we consider the
// In NET+ if the prefix is absent or different than 'aot:' or 'log:' we consider the
// property to contain value for the dotnet tracing profiler.
constexpr char AOT_PREFIX[] = "aot:";
if (!value.starts_with (AOT_PREFIX)) {
constexpr char LOG_PREFIX[] = "log:";
if (!value.starts_with (AOT_PREFIX) && !value.starts_with (LOG_PREFIX)) {
// setenv(3) makes copies of its arguments
setenv ("DOTNET_DiagnosticPorts", value.get (), 1);
return;
Expand Down Expand Up @@ -1655,12 +1656,18 @@ MonodroidRuntime::set_profile_options ()
if (!have_output_arg) {
constexpr char PROFILE_FILE_NAME_PREFIX[] = "profile.";
constexpr char AOT_EXT[] = "aotprofile";
constexpr char MLPD_EXT[] = "mlpd";

output_path
.assign_c (androidSystem.get_override_dir (0))
.append (MONODROID_PATH_SEPARATOR)
.append (PROFILE_FILE_NAME_PREFIX)
.append (AOT_EXT);
.append (PROFILE_FILE_NAME_PREFIX);

if (value.starts_with (AOT_PREFIX)) {
output_path.append (AOT_EXT);
} else if (value.starts_with (LOG_PREFIX)) {
output_path.append (MLPD_EXT);
}

value
.append (",")
Expand Down