Skip to content

Commit 96113be

Browse files
committed
Remove log spam
1 parent ac0f922 commit 96113be

File tree

6 files changed

+4
-18
lines changed

6 files changed

+4
-18
lines changed

samples/NativeAOT/run.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash -e
2-
APK="bin/Debug/net10.0-android/net.dot.hellonativeaot-Signed.apk"
2+
CONFIG=Release
3+
APK="bin/${CONFIG}/net10.0-android/net.dot.hellonativeaot-Signed.apk"
34
PACKAGE="net.dot.hellonativeaot"
45
ACTIVITY="my.MainActivity"
56

67
FAILED=no
78
rm -rf bin obj
8-
../../dotnet-local.sh build -bl || FAILED=yes
9+
../../dotnet-local.sh build -c ${CONFIG} -bl || FAILED=yes
910
../../dotnet-local.sh msbuild -v:diag msbuild.binlog > msbuild.txt
1011
if [ "${FAILED}" == "yes" ]; then
1112
echo Build failed
@@ -18,7 +19,7 @@ fi
1819

1920
adb uninstall "${PACKAGE}" || true
2021
adb install -r -d --no-streaming --no-fastdeploy "${APK}"
21-
adb shell setprop debug.mono.log default,assembly,timing=bare
22+
#adb shell setprop debug.mono.log default,assembly,timing=bare
2223
adb logcat -G 128M
2324
adb logcat -c
2425
adb shell am start -S --user "0" -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "${PACKAGE}/${ACTIVITY}" -W

src/native/clr/host/internal-pinvokes-shared.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ BridgeProcessingFtn clr_initialize_gc_bridge (
3333
BridgeProcessingStartedFtn bridge_processing_started_callback,
3434
BridgeProcessingFinishedFtn bridge_processing_finished_callback) noexcept
3535
{
36-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
3736
return GCBridge::initialize_callback (bridge_processing_started_callback, bridge_processing_finished_callback);
3837
}
3938

@@ -121,4 +120,3 @@ void _monodroid_detect_cpu_and_architecture (uint16_t *built_for_cpu, uint16_t *
121120
monodroid_detect_cpu_and_architecture (*built_for_cpu, *running_on_cpu, _64bit);
122121
*is64bit = _64bit;
123122
}
124-

src/native/clr/include/host/bridge-processing.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ public:
1414
private:
1515
auto maybe_call_gc_user_peerable_add_managed_reference ([[maybe_unused]] JNIEnv *env, [[maybe_unused]] jobject from, [[maybe_unused]] jobject to) noexcept -> bool override final
1616
{
17-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
1817
return false; // no-op for CoreCLR, we didn't process the call
1918
}
2019

2120
auto maybe_call_gc_user_peerable_clear_managed_references ([[maybe_unused]] JNIEnv *env, [[maybe_unused]] jobject handle) noexcept -> bool override final
2221
{
23-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
2422
return false; // no-op for CoreCLR, we didn't process the call
2523
}
2624
};

src/native/nativeaot/host/bridge-processing.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ using namespace xamarin::android;
88

99
void BridgeProcessing::naot_initialize_on_runtime_init (JNIEnv *env) noexcept
1010
{
11-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
12-
1311
GCUserPeerable_class = env->FindClass ("net/dot/jni/GCUserPeerable");
1412
if (GCUserPeerable_class == nullptr) [[unlikely]] {
1513
Helpers::abort_application (
@@ -39,7 +37,6 @@ void BridgeProcessing::naot_initialize_on_runtime_init (JNIEnv *env) noexcept
3937

4038
auto BridgeProcessing::maybe_call_gc_user_peerable_add_managed_reference (JNIEnv *env, jobject from, jobject to) noexcept -> bool
4139
{
42-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
4340
if (!env->IsInstanceOf (from, GCUserPeerable_class)) {
4441
return false;
4542
}
@@ -50,7 +47,6 @@ auto BridgeProcessing::maybe_call_gc_user_peerable_add_managed_reference (JNIEnv
5047

5148
auto BridgeProcessing::maybe_call_gc_user_peerable_clear_managed_references (JNIEnv *env, jobject handle) noexcept -> bool
5249
{
53-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
5450
if (!env->IsInstanceOf (handle, GCUserPeerable_class)) {
5551
return false;
5652
}

src/native/nativeaot/host/host-jni.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ using namespace xamarin::android;
66

77
auto XA_Host_NativeAOT_JNI_OnLoad (JavaVM *vm, void *reserved) -> int
88
{
9-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
109
return Host::Java_JNI_OnLoad (vm, reserved);
1110
}
1211

1312
void XA_Host_NativeAOT_OnInit ()
1413
{
15-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
1614
Host::OnInit ();
1715
}

src/native/nativeaot/host/host.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ auto HostCommon::Java_JNI_OnLoad (JavaVM *vm, void *reserved) noexcept -> jint
2222
{
2323
Logger::init_logging_categories ();
2424
HostEnvironment::init ();
25-
26-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
27-
2825
jvm = vm;
2926

3027
JNIEnv *env = nullptr;
@@ -49,8 +46,6 @@ auto HostCommon::Java_JNI_OnLoad (JavaVM *vm, void *reserved) noexcept -> jint
4946

5047
void Host::OnInit () noexcept
5148
{
52-
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
53-
5449
JNIEnv *env = OSBridge::ensure_jnienv ();
5550
jclass runtimeClass = env->FindClass ("mono/android/Runtime");
5651
OSBridge::initialize_on_runtime_init (env, runtimeClass);

0 commit comments

Comments
 (0)