Skip to content

Commit 77b2c2b

Browse files
elinor-fungjkotas
authored andcommitted
Remove BINDER_DEBUG_LOG (dotnet#27574)
1 parent 32e2ae9 commit 77b2c2b

25 files changed

+150
-1098
lines changed

Documentation/project-docs/clr-configuration-knobs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ Name | Description | Type | Class | Default Value | Flags
595595
Name | Description | Type | Class | Default Value | Flags
596596
-----|-------------|------|-------|---------------|-------
597597
`APIThreadStress` | Used to test Loader for race conditions | `DWORD` | `INTERNAL` | |
598-
`CoreClrBinderLog` | Debug flag that enabled detailed log for new binder (similar to stress logging). | `STRING` | `INTERNAL` | |
599598
`ForceLog` | Fusion flag to enforce assembly binding log. Heavily used and documented in MSDN and BLOGS. | `DWORD` | `EXTERNAL` | |
600599
`WinMDPath` | Path for Windows WinMD files | `STRING` | `INTERNAL` | |
601600

src/binder/CMakeLists.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@ include_directories(BEFORE "../vm")
44
include_directories(BEFORE "inc")
55

66
set(BINDER_COMMON_SOURCES
7-
variables.cpp
8-
utils.cpp
9-
assemblyname.cpp
10-
propertymap.cpp
117
applicationcontext.cpp
128
assembly.cpp
13-
failurecache.cpp
149
assemblybinder.cpp
15-
stringlexer.cpp
16-
clrprivbindercoreclr.cpp
17-
debuglog.cpp
10+
assemblyidentitycache.cpp
11+
assemblyname.cpp
1812
bindinglog.cpp
13+
bindertracing.cpp
1914
cdebuglog.cpp
20-
textualidentityparser.cpp
21-
assemblyidentitycache.cpp
15+
clrprivbindercoreclr.cpp
2216
coreclrbindercommon.cpp
17+
failurecache.cpp
2318
fusionassemblyname.cpp
24-
bindertracing.cpp
19+
propertymap.cpp
20+
stringlexer.cpp
21+
textualidentityparser.cpp
22+
utils.cpp
23+
variables.cpp
2524
)
2625

2726
set(BINDER_COMMON_HEADERS
@@ -47,7 +46,6 @@ set(BINDER_COMMON_HEADERS
4746
inc/cdebuglog.hpp
4847
inc/clrprivbindercoreclr.h
4948
inc/coreclrbindercommon.h
50-
inc/debuglog.hpp
5149
inc/failurecache.hpp
5250
inc/failurecachehashtraits.hpp
5351
inc/fusionassemblyname.hpp

src/binder/applicationcontext.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@
1212
//
1313
// ============================================================
1414

15-
#ifndef FEATURE_CORESYSTEM
16-
#define DISABLE_BINDER_DEBUG_LOGGING
17-
#endif
18-
1915
#include "applicationcontext.hpp"
2016
#include "stringarraylist.h"
2117
#include "loadcontext.hpp"
2218
#include "propertymap.hpp"
2319
#include "failurecache.hpp"
2420
#include "assemblyidentitycache.hpp"
25-
#ifdef FEATURE_VERSIONING_LOG
26-
#include "debuglog.hpp"
27-
#endif // FEATURE_VERSIONING_LOG
2821
#include "utils.hpp"
2922
#include "variables.hpp"
3023
#include "ex.h"
@@ -111,8 +104,6 @@ namespace BINDER_SPACE
111104
HRESULT ApplicationContext::Init()
112105
{
113106
HRESULT hr = S_OK;
114-
BINDER_LOG_ENTER(W("ApplicationContext::Init"));
115-
BINDER_LOG_POINTER(W("this"), this);
116107

117108
ReleaseHolder<ExecutionContext> pExecutionContext;
118109

@@ -141,7 +132,6 @@ namespace BINDER_SPACE
141132
}
142133

143134
Exit:
144-
BINDER_LOG_LEAVE_HR(W("ApplicationContext::Init"), hr);
145135
return hr;
146136
}
147137

@@ -220,21 +210,15 @@ namespace BINDER_SPACE
220210
BOOL fAcquireLock)
221211
{
222212
HRESULT hr = S_OK;
223-
BINDER_LOG_ENTER(W("ApplicationContext::SetupBindingPaths"));
224-
BINDER_LOG_POINTER(W("this"), this);
225213

226214
#ifndef CROSSGEN_COMPILE
227215
CRITSEC_Holder contextLock(fAcquireLock ? GetCriticalSectionCookie() : NULL);
228216
#endif
229217
if (m_pTrustedPlatformAssemblyMap != nullptr)
230218
{
231-
#if defined(BINDER_DEBUG_LOG)
232-
BINDER_LOG(W("ApplicationContext::SetupBindingPaths: Binding paths already setup"));
233-
#endif // BINDER_LOG_STRING
234219
GO_WITH_HRESULT(S_OK);
235220
}
236221

237-
238222
//
239223
// Parse TrustedPlatformAssemblies
240224
//
@@ -256,7 +240,6 @@ namespace BINDER_SPACE
256240
#ifndef CROSSGEN_COMPILE
257241
if (Path::IsRelative(fileName))
258242
{
259-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Relative path not allowed"), fileName);
260243
GO_WITH_HRESULT(E_INVALIDARG);
261244
}
262245
#endif
@@ -329,7 +312,6 @@ namespace BINDER_SPACE
329312
if ((pExistingEntry->m_wszILFileName != nullptr && !isNativeImage) ||
330313
(pExistingEntry->m_wszNIFileName != nullptr && isNativeImage))
331314
{
332-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Skipping TPA entry because of already existing IL/NI entry for short name "), fileName.GetUnicode());
333315
continue;
334316
}
335317
}
@@ -374,8 +356,6 @@ namespace BINDER_SPACE
374356
FileNameMapEntry fileNameExistenceEntry;
375357
fileNameExistenceEntry.m_wszFileName = wszFileName;
376358
m_pFileNameHash->AddOrReplace(fileNameExistenceEntry);
377-
378-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Added TPA entry"), wszFileName);
379359
}
380360

381361
//
@@ -396,13 +376,11 @@ namespace BINDER_SPACE
396376
#ifndef CROSSGEN_COMPILE
397377
if (Path::IsRelative(pathName))
398378
{
399-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Relative path not allowed"), pathName);
400379
GO_WITH_HRESULT(E_INVALIDARG);
401380
}
402381
#endif
403382

404383
m_platformResourceRoots.Append(pathName);
405-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Added resource root"), pathName);
406384
}
407385

408386
//
@@ -423,13 +401,11 @@ namespace BINDER_SPACE
423401
#ifndef CROSSGEN_COMPILE
424402
if (Path::IsRelative(pathName))
425403
{
426-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Relative path not allowed"), pathName);
427404
GO_WITH_HRESULT(E_INVALIDARG);
428405
}
429406
#endif
430407

431408
m_appPaths.Append(pathName);
432-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Added App Path"), pathName);
433409
}
434410

435411
//
@@ -450,26 +426,21 @@ namespace BINDER_SPACE
450426
#ifndef CROSSGEN_COMPILE
451427
if (Path::IsRelative(pathName))
452428
{
453-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Relative path not allowed"), pathName);
454429
GO_WITH_HRESULT(E_INVALIDARG);
455430
}
456431
#endif
457432

458433
m_appNiPaths.Append(pathName);
459-
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Added App NI Path"), pathName);
460434
}
461435

462436
Exit:
463-
BINDER_LOG_LEAVE_HR(W("ApplicationContext::SetupBindingPaths"), hr);
464437
return hr;
465438
}
466439

467440
HRESULT ApplicationContext::GetAssemblyIdentity(LPCSTR szTextualIdentity,
468441
AssemblyIdentityUTF8 **ppAssemblyIdentity)
469442
{
470443
HRESULT hr = S_OK;
471-
BINDER_LOG_ENTER(W("ApplicationContext::GetAssemblyIdentity"));
472-
BINDER_LOG_POINTER(W("this"), this);
473444

474445
_ASSERTE(szTextualIdentity != NULL);
475446
_ASSERTE(ppAssemblyIdentity != NULL);
@@ -496,7 +467,6 @@ namespace BINDER_SPACE
496467
*ppAssemblyIdentity = pAssemblyIdentity;
497468

498469
Exit:
499-
BINDER_LOG_LEAVE_HR(W("ApplicationContext::GetAssemblyIdentity"), hr);
500470
return hr;
501471
}
502472

src/binder/assembly.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ namespace BINDER_SPACE
8181

8282
Assembly::~Assembly()
8383
{
84-
BINDER_LOG_ASSEMBLY_NAME(L"destructing assembly", m_pAssemblyName);
85-
8684
if (m_pPEImage != NULL)
8785
{
8886
BinderReleasePEImage(m_pPEImage);
@@ -109,7 +107,6 @@ namespace BINDER_SPACE
109107
BOOL fIsInGAC)
110108
{
111109
HRESULT hr = S_OK;
112-
BINDER_LOG_ENTER(L"Assembly::Init");
113110

114111
ReleaseHolder<AssemblyName> pAssemblyName;
115112
SAFE_NEW(pAssemblyName, AssemblyName);
@@ -122,10 +119,6 @@ namespace BINDER_SPACE
122119
GetPath().Set(assemblyPath);
123120
}
124121

125-
BINDER_LOG_ASSEMBLY_NAME(L"AssemblyNameDef", pAssemblyName);
126-
BINDER_LOG_STRING(L"System Architecture",
127-
AssemblyName::ArchitectureToString(GetSystemArchitecture()));
128-
129122
// Safe architecture for validation
130123
PEKIND kAssemblyArchitecture;
131124
kAssemblyArchitecture = pAssemblyName->GetArchitecture();
@@ -145,7 +138,6 @@ namespace BINDER_SPACE
145138
}
146139

147140
Exit:
148-
BINDER_LOG_LEAVE_HR(L"Assembly::Init", hr);
149141
return hr;
150142
}
151143

0 commit comments

Comments
 (0)