-
Notifications
You must be signed in to change notification settings - Fork 5k
GC Bridge for Android scenarios #114184
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
base: main
Are you sure you want to change the base?
GC Bridge for Android scenarios #114184
Conversation
Prior to check-in, update all places with "!TODO-JAVA!".
Implement scanning of the new GC Handle and calling a new VM callout to process the resulting data.
Implement the VM side of the GC Handle processing and callout to mark cross references.
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/interop-contrib |
@@ -161,6 +161,11 @@ if(FEATURE_OBJCMARSHAL) | |||
add_compile_definitions(FEATURE_OBJCMARSHAL) | |||
endif() | |||
|
|||
if(FEATURE_JAVAMARSHAL) | |||
add_compile_definitions(FEATURE_JAVAMARSHAL) | |||
add_compile_definitions(FEATURE_GCBRIDGE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need two different FEATURE_... ifdefs for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point there aren't any. While I was implementing it the logic was clearly distinct though. There is the general concept of the GC Bridge and also the specific Java API and infrastructure that exposes that data. It was natural to separate the two given how we've implemented other interop scenarios involving the GC. It is entirely reasonable to collapse them, but making them distinct now is much easier than retroactively splitting them in the future.
@@ -14,7 +14,7 @@ | |||
#endif | |||
|
|||
#define INITIAL_HANDLE_TABLE_ARRAY_SIZE 10 | |||
#define HANDLE_MAX_INTERNAL_TYPES 12 | |||
#define HANDLE_MAX_INTERNAL_TYPES 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there perf consequences from bumping this limit? Should we start recycling deprecated HDNTYPE values (e.g. HNDTYPE_ASYNCPINNED)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just need to be careful that recycling wouldnt cause backcompat issues for standalone gc.
GCScan::GcScanWithBridge(GCHeap::Promote, | ||
condemned_gen_number, max_generation, | ||
&sc); | ||
drain_mark_queue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder whether drain_mark_queue
is required after each scan or can it be combined with the one above ?
condemned_gen_number, max_generation, | ||
&sc); | ||
drain_mark_queue(); | ||
// fire_mark_event (ETW::???, current_promoted_bytes, last_promoted_bytes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assume this will be a TODO to enable later?
} | ||
CONTRACTL_END; | ||
|
||
#ifdef FEATURE_GCBRIDGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt the full function be under a #ifdef
?
I don't think changes on the GC side need to be reviewed at this point. I know they will be different but we will address those when we actually start implementation. |
This PR contains the VM side of the work and the introduction of a new GC Handle type.
The GC work still needs to be completed. This is currently just a place to share work.