Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] Fix source profiler library name. #35

Merged
merged 1 commit into from
May 11, 2016

Conversation

jonpryor
Copy link
Member

The _InstallRuntimes target in
build-tools/mono-runtimes/mono-runtimes.targets copies over
libmono-profiler-log.so into
bin/$(Configuration)/lib/xbuild/Xamarin/Android/lib/ABI/libmono-profiler-log.so.

Unfortunately, the <BuildApk/> task looks for
libmono-profiler-log.ABI.so, which is a file that doesn't exist.

Result: If BuildApk.AndroidEmbedProfilers is not the empty string
and/or BuildApk.Debug is "true" ($(AndroidIncludeDebugSymbols) is
True, e.g. $(DebugSymbols) is True and $(DebugType) is Full), then
the build breaks:

Error executing task BuildApk: Could not find file
".../bin/Debug/lib/xbuild/Xamarin/Android/lib/armeabi-v7a/libmono-profiler-log.armeabi-v7a.so".

Fix the source filename so that profilers can be properly embedded.

The `_InstallRuntimes` target in
`build-tools/mono-runtimes/mono-runtimes.targets` copies over
`libmono-profiler-log.so` into
`bin/$(Configuration)/lib/xbuild/Xamarin/Android/lib/ABI/libmono-profiler-log.so`.

Unfortunately, the `<BuildApk/>` task looks for
`libmono-profiler-log.ABI.so`, which is a file that doesn't exist.

Result: If `BuildApk.AndroidEmbedProfilers` is not the empty string
and/or `BuildApk.Debug` is "true" (`$(AndroidIncludeDebugSymbols)` is
True, e.g. `$(DebugSymbols)` is True and `$(DebugType)` is Full), then
the build breaks:

	Error executing task BuildApk: Could not find file
	".../bin/Debug/lib/xbuild/Xamarin/Android/lib/armeabi-v7a/libmono-profiler-log.armeabi-v7a.so".

Fix the source filename so that profilers can be properly embedded.
@dellis1972 dellis1972 merged commit 5914fc1 into dotnet:master May 11, 2016
radical pushed a commit that referenced this pull request May 8, 2018
I've come across some log files which would contain *several thousand*
global references, as per the `grefc` values, but when processing via
logcat-parse `grefs.AlivePeers.Count()` would invariably return `11`,
or some other ludicrously low value given the input.

On further investigation, a problem is with repeated handle values.
Once a handle has been disposed, there's no reason why it couldn't be
reused again:

	+g+ grefc 1 gwrefc 0 obj-handle 0x4a00009/L -> new-handle 0x19004aa/G from thread '(null)'(3)
	-g- grefc 0 gwrefc 0 handle 0x19004aa/G from thread '(null)'(3)
	# OK, created + destroyed an instance...

	+g+ grefc 1 gwrefc 0 obj-handle 0x4a00009/L -> new-handle 0x19004aa/G from thread '(null)'(3)
	# OK, created a *different* instance

Unfortunately, `logcat-parse` would treat the second +g+ as if it were
an alias of the originally created instance. As such,
`grefs.AlivePeers.Count()` would return 0, not 1, which is wrong.

To better support this, keep a separate `alive` list of peers, and
only consult the "alive" list when performing handle lookups. This
prevents the original -- dead! -- PeerInfo from being reused, allowing
us to have (more?) accurate peer information.
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Jul 21, 2022
Changes: mono/opentk@50128f7...daa9b2d

  * mono/opentk@daa9b2d5: [nuget] use $(PackageLicenseExpression), not $(PackageLicenseUrl) (dotnet#35)
  * mono/opentk@351eb656: [ci] Use new EO compliant build pools (dotnet#33)
  * mono/opentk@95ab20b1: Try to fix DllNotFoundException under .net 6 (dotnet#32)
  * mono/opentk@3de39a40: Merge pull request dotnet#30 from dellis1972/proguard
  * mono/opentk@79ea8095: rework
  * mono/opentk@3311a8ac: Add Proguard config support
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Jul 22, 2022
Changes: mono/opentk@50128f7...daa9b2d

  * mono/opentk@daa9b2d5: [nuget] use $(PackageLicenseExpression), not $(PackageLicenseUrl) (dotnet#35)
  * mono/opentk@351eb656: [ci] Use new EO compliant build pools (dotnet#33)
  * mono/opentk@95ab20b1: Try to fix DllNotFoundException under .net 6 (dotnet#32)
  * mono/opentk@3de39a40: Merge pull request dotnet#30 from dellis1972/proguard
  * mono/opentk@79ea8095: rework
  * mono/opentk@3311a8ac: Add Proguard config support
jonpryor added a commit that referenced this pull request Jul 26, 2022
Changes: mono/opentk@50128f7...daa9b2d

  * mono/opentk@daa9b2d5: [nuget] use $(PackageLicenseExpression), not $(PackageLicenseUrl) (#35)
  * mono/opentk@351eb656: [ci] Use new EO compliant build pools (#33)
  * mono/opentk@95ab20b1: Try to fix DllNotFoundException under .net 6 (#32)
  * mono/opentk@3de39a40: Merge pull request #30 from dellis1972/proguard
  * mono/opentk@79ea8095: rework
  * mono/opentk@3311a8ac: Add Proguard config support
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants