Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove helper frames#97469

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
756daf8
Convert FCalls to QCalls
AaronRobinsonMSFTJan 17, 2024
d39ca39
Make assert links clickable in VSCode.
AaronRobinsonMSFTJan 24, 2024
619ab93
Change CustomAttribute data parsing to C#.
AaronRobinsonMSFTJan 24, 2024
5cfa45d
Merge remote-tracking branch 'upstream/main' into remove_helper_frames
AaronRobinsonMSFTJan 24, 2024
24daba8
Remove warning disable.
AaronRobinsonMSFTJan 24, 2024
f5881a1
Review feedback
AaronRobinsonMSFTJan 24, 2024
3a9334b
Update AttributeTests.cs
AaronRobinsonMSFTJan 25, 2024
3bf5f11
Review feedback.
AaronRobinsonMSFTJan 25, 2024
498c764
Remove edit.
AaronRobinsonMSFTJan 25, 2024
3500226
Remove rouge line.
AaronRobinsonMSFTJan 25, 2024
7c5dbd0
Feedback for GC method
AaronRobinsonMSFTJan 25, 2024
ef9c704
CustomAttribute feedback
AaronRobinsonMSFTJan 25, 2024
e0e2da8
Apply suggestions from code review
AaronRobinsonMSFTJan 25, 2024
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
14 changes: 9 additions & 5 deletionssrc/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -106,9 +106,6 @@ internal enum GC_ALLOC_FLAGS
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern Array AllocateNewArray(IntPtr typeHandle, int length, GC_ALLOC_FLAGS flags);

[MethodImpl(MethodImplOptions.InternalCall)]
private static extern int GetGenerationWR(IntPtr handle);

[LibraryImport(RuntimeHelpers.QCall, EntryPoint = "GCInterface_GetTotalMemory")]
private static partial long GetTotalMemory();

Expand DownExpand Up@@ -290,9 +287,16 @@ public static void KeepAlive(object? obj)
//
public static int GetGeneration(WeakReference wo)
{
int result = GetGenerationWR(wo.WeakHandle);
// Note - This throws an NRE if given a null weak reference.
object? obj = GCHandle.InternalGet(wo.WeakHandle);
KeepAlive(wo);
return result;

if (obj is null)
{
throw new ArgumentNullException(nameof(wo));
}

return GetGeneration(obj);
}

// Returns the maximum GC generation. Currently assumes only 1 heap.
Expand Down
View file
Open in desktop

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletionssrc/coreclr/inc/contract.inl
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -493,7 +493,7 @@ void CONTRACT_ASSERT(const char *szElaboration,
{
char Buf[512*20 + 2048 + 1024];

sprintf_s(Buf,ARRAY_SIZE(Buf), "CONTRACT VIOLATION by %s at \"%s\" @%d\n\n%s\n", szFunction, szFile, lineNum, szElaboration);
sprintf_s(Buf,ARRAY_SIZE(Buf), "CONTRACT VIOLATION by %s at \"%s\":%d\n\n%s\n", szFunction, szFile, lineNum, szElaboration);

int count = 20;
ContractStackRecord *pRec = CheckClrDebugState() ? CheckClrDebugState()->GetContractStackTrace() : NULL;
Expand DownExpand Up@@ -530,7 +530,7 @@ void CONTRACT_ASSERT(const char *szElaboration,
}

sprintf_s(tmpbuf,ARRAY_SIZE(tmpbuf),
"\n%s %s in %s at \"%s\" @%d",
"\n%s %s in %s at \"%s\":%d",
fshowconflict ? "VIOLATED-->" : " ",
pRec->m_construct,
pRec->m_szFunction,
Expand Down
6 changes: 3 additions & 3 deletionssrc/coreclr/utilcode/debug.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -236,7 +236,7 @@ bool _DbgBreakCheck(

sprintf_s(formatBuffer, sizeof(formatBuffer),
"\nAssert failure(PID %d [0x%08x], Thread: %d [0x%04x]): %s\n"
" File: %s Line:%d\n"
" File: %s:%d\n"
" Image: %s\n\n",
GetCurrentProcessId(), GetCurrentProcessId(),
GetCurrentThreadId(), GetCurrentThreadId(),
Expand DownExpand Up@@ -517,7 +517,7 @@ void DECLSPEC_NORETURN __FreeBuildAssertFail(const char *szFile, int iLine, cons

SString buffer;
buffer.Printf("CLR: Assert failure(PID %d [0x%08x], Thread: %d [0x%x]): %s\n"
" File: %s, Line:%d Image:\n%s\n",
" File: %s:%d Image:\n%s\n",
GetCurrentProcessId(), GetCurrentProcessId(),
GetCurrentThreadId(), GetCurrentThreadId(),
szExpr, szFile, iLine, modulePath.GetUTF8());
Expand All@@ -528,7 +528,7 @@ void DECLSPEC_NORETURN __FreeBuildAssertFail(const char *szFile, int iLine, cons

// Log to the stress log. Note that we can't include the szExpr b/c that
// may not be a string literal (particularly for formatt-able asserts).
STRESS_LOG2(LF_ASSERT, LL_ALWAYS, "ASSERT:%s, line:%d\n", szFile, iLine);
STRESS_LOG2(LF_ASSERT, LL_ALWAYS, "ASSERT:%s:%d\n", szFile, iLine);

FailFastOnAssert();
UNREACHABLE();
Expand Down
27 changes: 0 additions & 27 deletionssrc/coreclr/vm/comutilnative.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -795,33 +795,6 @@ extern "C" int QCALLTYPE GCInterface_EndNoGCRegion()
return retVal;
}

/*===============================GetGenerationWR================================
**Action: Returns the generation in which the object pointed to by a WeakReference is found.
**Returns:
**Arguments: args->handle -- the OBJECTHANDLE to the object which we're locating.
**Exceptions: ArgumentException if handle points to an object which is not accessible.
==============================================================================*/
FCIMPL1(int, GCInterface::GetGenerationWR, LPVOID handle)
{
FCALL_CONTRACT;

int iRetVal = 0;

HELPER_METHOD_FRAME_BEGIN_RET_0();

OBJECTREF temp;
temp = ObjectFromHandle((OBJECTHANDLE) handle);
if (temp == NULL)
COMPlusThrowArgumentNull(W("wo"));

iRetVal = (INT32)GCHeapUtilities::GetGCHeap()->WhichGeneration(OBJECTREFToObject(temp));

HELPER_METHOD_FRAME_END();

return iRetVal;
}
FCIMPLEND

FCIMPL0(int, GCInterface::GetLastGCPercentTimeInGC)
{
FCALL_CONTRACT;
Expand Down
1 change: 0 additions & 1 deletionsrc/coreclr/vm/comutilnative.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -160,7 +160,6 @@ class GCInterface {
static FCDECL1(void, SetLOHCompactionMode, int newLOHCompactionyMode);
static FCDECL2(FC_BOOL_RET, RegisterForFullGCNotification, UINT32 gen2Percentage, UINT32 lohPercentage);
static FCDECL0(FC_BOOL_RET, CancelFullGCNotification);
static FCDECL1(int, GetGenerationWR, LPVOID handle);
static FCDECL1(int, GetGeneration, Object* objUNSAFE);
static FCDECL0(UINT64, GetSegmentSize);
static FCDECL0(int, GetLastGCPercentTimeInGC);
Expand Down
25 changes: 0 additions & 25 deletionssrc/coreclr/vm/corelib.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -216,31 +216,6 @@ DEFINE_FIELD(STUBMETHODINFO, HANDLE, m_value)

DEFINE_CLASS(CONSTRUCTOR_INFO, Reflection, ConstructorInfo)

DEFINE_CLASS_U(Reflection, CustomAttributeEncodedArgument, CustomAttributeValue)
DEFINE_FIELD_U(m_primitiveValue, CustomAttributeValue, m_rawValue)
DEFINE_FIELD_U(m_arrayValue, CustomAttributeValue, m_value)
DEFINE_FIELD_U(m_stringValue, CustomAttributeValue, m_enumOrTypeName)
DEFINE_FIELD_U(m_type, CustomAttributeValue, m_type)
DEFINE_CLASS(CUSTOM_ATTRIBUTE_ENCODED_ARGUMENT, Reflection, CustomAttributeEncodedArgument)

DEFINE_CLASS_U(Reflection, CustomAttributeNamedParameter, CustomAttributeNamedArgument)
DEFINE_FIELD_U(m_argumentName, CustomAttributeNamedArgument, m_argumentName)
DEFINE_FIELD_U(m_fieldOrProperty, CustomAttributeNamedArgument, m_propertyOrField)
DEFINE_FIELD_U(m_padding, CustomAttributeNamedArgument, m_padding)
DEFINE_FIELD_U(m_type, CustomAttributeNamedArgument, m_type)
DEFINE_FIELD_U(m_encodedArgument, CustomAttributeNamedArgument, m_value)

DEFINE_CLASS_U(Reflection, CustomAttributeCtorParameter, CustomAttributeArgument)
DEFINE_FIELD_U(m_type, CustomAttributeArgument, m_type)
DEFINE_FIELD_U(m_encodedArgument, CustomAttributeArgument, m_value)

DEFINE_CLASS_U(Reflection, CustomAttributeType, CustomAttributeType)
DEFINE_FIELD_U(m_enumName, CustomAttributeType, m_enumName)
DEFINE_FIELD_U(m_encodedType, CustomAttributeType, m_tag)
DEFINE_FIELD_U(m_encodedEnumType, CustomAttributeType, m_enumType)
DEFINE_FIELD_U(m_encodedArrayType, CustomAttributeType, m_arrayType)
DEFINE_FIELD_U(m_padding, CustomAttributeType, m_padding)

DEFINE_CLASS_U(Globalization, CultureInfo, CultureInfoBaseObject)
DEFINE_FIELD_U(_compareInfo, CultureInfoBaseObject, _compareInfo)
DEFINE_FIELD_U(_textInfo, CultureInfoBaseObject, _textInfo)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp