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

Delete dead code #37847

Merged
merged 1 commit into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
178 changes: 0 additions & 178 deletions src/coreclr/src/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10258,184 +10258,6 @@ void __stdcall ProfilerUnmanagedToManagedTransitionMD(MethodDesc *pMD,
#endif // PROFILING_SUPPORTED


FCIMPL0(FC_BOOL_RET, ProfilingFCallHelper::FC_TrackRemoting)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
FC_RETURN_BOOL(CORProfilerTrackRemoting());
#else // !PROFILING_SUPPORTED
FC_RETURN_BOOL(FALSE);
#endif // !PROFILING_SUPPORTED
}
FCIMPLEND

FCIMPL0(FC_BOOL_RET, ProfilingFCallHelper::FC_TrackRemotingCookie)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
FC_RETURN_BOOL(CORProfilerTrackRemotingCookie());
#else // !PROFILING_SUPPORTED
FC_RETURN_BOOL(FALSE);
#endif // !PROFILING_SUPPORTED
}
FCIMPLEND

FCIMPL0(FC_BOOL_RET, ProfilingFCallHelper::FC_TrackRemotingAsync)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
FC_RETURN_BOOL(CORProfilerTrackRemotingAsync());
#else // !PROFILING_SUPPORTED
FC_RETURN_BOOL(FALSE);
#endif // !PROFILING_SUPPORTED
}
FCIMPLEND

FCIMPL2(void, ProfilingFCallHelper::FC_RemotingClientSendingMessage, GUID *pId, CLR_BOOL fIsAsync)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
// Need to erect a GC frame so that GCs can occur without a problem
// within the profiler code.

// Note that we don't need to worry about pId moving around since
// it is a value class declared on the stack and so GC doesn't
// know about it.

_ASSERTE (!GCHeapUtilities::GetGCHeap()->IsHeapPointer(pId)); // should be on the stack, not in the heap
HELPER_METHOD_FRAME_BEGIN_NOPOLL();

{
BEGIN_PIN_PROFILER(CORProfilerPresent());
GCX_PREEMP();
if (CORProfilerTrackRemotingCookie())
{
g_profControlBlock.pProfInterface->GetGUID(pId);
_ASSERTE(pId->Data1);

g_profControlBlock.pProfInterface->RemotingClientSendingMessage(pId, fIsAsync);
}
else
{
g_profControlBlock.pProfInterface->RemotingClientSendingMessage(NULL, fIsAsync);
}
END_PIN_PROFILER();
}
HELPER_METHOD_FRAME_END_POLL();
#endif // PROFILING_SUPPORTED
}
FCIMPLEND


FCIMPL2_VI(void, ProfilingFCallHelper::FC_RemotingClientReceivingReply, GUID id, CLR_BOOL fIsAsync)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
// Need to erect a GC frame so that GCs can occur without a problem
// within the profiler code.

// Note that we don't need to worry about pId moving around since
// it is a value class declared on the stack and so GC doesn't
// know about it.

HELPER_METHOD_FRAME_BEGIN_NOPOLL();


{
BEGIN_PIN_PROFILER(CORProfilerPresent());
GCX_PREEMP();
if (CORProfilerTrackRemotingCookie())
{
g_profControlBlock.pProfInterface->RemotingClientReceivingReply(&id, fIsAsync);
}
else
{
g_profControlBlock.pProfInterface->RemotingClientReceivingReply(NULL, fIsAsync);
}
END_PIN_PROFILER();
}

HELPER_METHOD_FRAME_END_POLL();
#endif // PROFILING_SUPPORTED
}
FCIMPLEND


FCIMPL2_VI(void, ProfilingFCallHelper::FC_RemotingServerReceivingMessage, GUID id, CLR_BOOL fIsAsync)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
// Need to erect a GC frame so that GCs can occur without a problem
// within the profiler code.

// Note that we don't need to worry about pId moving around since
// it is a value class declared on the stack and so GC doesn't
// know about it.

HELPER_METHOD_FRAME_BEGIN_NOPOLL();

{
BEGIN_PIN_PROFILER(CORProfilerPresent());
GCX_PREEMP();
if (CORProfilerTrackRemotingCookie())
{
g_profControlBlock.pProfInterface->RemotingServerReceivingMessage(&id, fIsAsync);
}
else
{
g_profControlBlock.pProfInterface->RemotingServerReceivingMessage(NULL, fIsAsync);
}
END_PIN_PROFILER();
}

HELPER_METHOD_FRAME_END_POLL();
#endif // PROFILING_SUPPORTED
}
FCIMPLEND

FCIMPL2(void, ProfilingFCallHelper::FC_RemotingServerSendingReply, GUID *pId, CLR_BOOL fIsAsync)
{
FCALL_CONTRACT;

#ifdef PROFILING_SUPPORTED
// Need to erect a GC frame so that GCs can occur without a problem
// within the profiler code.

// Note that we don't need to worry about pId moving around since
// it is a value class declared on the stack and so GC doesn't
// know about it.

HELPER_METHOD_FRAME_BEGIN_NOPOLL();

{
BEGIN_PIN_PROFILER(CORProfilerPresent());
GCX_PREEMP();
if (CORProfilerTrackRemotingCookie())
{
g_profControlBlock.pProfInterface->GetGUID(pId);
_ASSERTE(pId->Data1);

g_profControlBlock.pProfInterface->RemotingServerSendingReply(pId, fIsAsync);
}
else
{
g_profControlBlock.pProfInterface->RemotingServerSendingReply(NULL, fIsAsync);
}
END_PIN_PROFILER();
}

HELPER_METHOD_FRAME_END_POLL();
#endif // PROFILING_SUPPORTED
}
FCIMPLEND


//*******************************************************************************************
// These do a lot of work for us, setting up Frames, gathering arg info and resolving generics.
//*******************************************************************************************
Expand Down
40 changes: 0 additions & 40 deletions src/coreclr/src/vm/proftoeeinterfaceimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,46 +710,6 @@ class ProfToEEInterfaceImpl : public ICorProfilerInfo12

#endif // PROFILING_SUPPORTED

//---------------------------------------------------------------------------------------
// This provides the implementations for FCALLs in managed code related to profiling

class ProfilingFCallHelper
{
public:
// This is a high-efficiency way for managed profiler code to determine if
// profiling of remoting is active.
static FCDECL0(FC_BOOL_RET, FC_TrackRemoting);

// This is a high-efficiency way for managed profiler code to determine if
// profiling of remoting with RPC cookie IDs is active.
static FCDECL0(FC_BOOL_RET, FC_TrackRemotingCookie);

// This is a high-efficiency way for managed profiler code to determine if
// profiling of asynchronous remote calls is profiled
static FCDECL0(FC_BOOL_RET, FC_TrackRemotingAsync);

// This will let the profiler know that the client side is sending a message to
// the server-side.
static FCDECL2(void, FC_RemotingClientSendingMessage, GUID * pId, CLR_BOOL fIsAsync);

// For __cdecl calling convention both arguments end up on
// the stack but the order in which the jit puts them there needs to be reversed
// For __fastcall calling convention the reversal has no effect because the GUID doesn't
// fit in a register. On IA64 the macro is different.

// This will let the profiler know that the client side is receiving a reply
// to a message that it sent
static FCDECL2_VI(void, FC_RemotingClientReceivingReply, GUID id, CLR_BOOL fIsAsync);

// This will let the profiler know that the server side is receiving a message
// from a client
static FCDECL2_VI(void, FC_RemotingServerReceivingMessage, GUID id, CLR_BOOL fIsAsync);

// This will let the profiler know that the server side is sending a reply to
// a received message.
static FCDECL2(void, FC_RemotingServerSendingReply, GUID * pId, CLR_BOOL fIsAsync);
};

#endif // __PROFTOEEINTERFACEIMPL_H__