Skip to content

GcStress: choose strategy for instrumenting prejitted code #10184

Open
@AndyAyersMS

Description

@AndyAyersMS

GcStress currently tries to instrument NGEN precompiled methods twice: once during Module::Initialize (with a twist for the core library) and a second time during MethodDesc::PrepareILBasedCode (with a twist for prejitted IL stubs).

R2R precompiled methods are never instrumented, currently.

Seems like we should have only one strategy and it should apply to all cases of prejitted code.

Early instrumentation during module load is nice because it avoids race conditions that can plague on-demand instrumentation. But there is an upfront cost as potentially thousands of methods need to be instrumented but only a few of them will ever be executed.

Late instrumentation is more pay for play but must be done carefully so that no thread can see a partially instrumented method.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions