@@ -50,6 +50,7 @@ bool IsInCantAllocStressLogRegion()
50
50
size_t StressLog::writing_base_address;
51
51
size_t StressLog::reading_base_address;
52
52
53
+ bool s_showAllMessages = false ;
53
54
BOOL g_bDacBroken;
54
55
WCHAR g_mdName[1 ];
55
56
SYMBOLS* g_ExtSymbols;
@@ -608,13 +609,15 @@ void Usage()
608
609
printf (" e.g. '-tid:2bc8,GC3,BG14' would print messages from thread 2bc8, the gc thread\n " );
609
610
printf (" associated with heap 3, and the background GC thread for heap 14\n " );
610
611
printf (" \n " );
611
- printf (" -e: printf earliest messages from all threads\n " );
612
+ printf (" -e: print earliest messages from all threads\n " );
612
613
printf (" -e:<thread id1>,<thread id2>,...: print earliest messages from the listed\n " );
613
614
printf (" threads. Thread ids are in hex, given as GC<decimal heap number>,\n " );
614
615
printf (" or BG<decimal heap number>\n " );
615
616
printf (" e.g. '-e:2bc8,GC3,BG14' would print the earliest messages from thread 2bc8,\n " );
616
617
printf (" the gc thread associated with heap 3, and the background GC thread for heap 14\n " );
617
618
printf (" \n " );
619
+ printf (" -a: print all messages from all threads\n " );
620
+ printf (" \n " );
618
621
}
619
622
620
623
// Translate escape sequences like "\n" - only common ones are handled
@@ -665,14 +668,14 @@ bool ParseOptions(int argc, char* argv[])
665
668
{
666
669
int i = s_valueFilterCount++;
667
670
char * end = nullptr ;
668
- s_valueFilter[i].start = strtoul (&arg[3 ], &end, 16 );
671
+ s_valueFilter[i].start = strtoull (&arg[3 ], &end, 16 );
669
672
if (*end == ' -' )
670
673
{
671
- s_valueFilter[i].end = strtoul (end + 1 , &end, 16 );
674
+ s_valueFilter[i].end = strtoull (end + 1 , &end, 16 );
672
675
}
673
676
else if (*end == ' +' )
674
677
{
675
- s_valueFilter[i].end = s_valueFilter[i].start + strtoul (end + 1 , &end, 16 );
678
+ s_valueFilter[i].end = s_valueFilter[i].start + strtoull (end + 1 , &end, 16 );
676
679
}
677
680
else if (*end != ' \0 ' )
678
681
{
@@ -749,7 +752,7 @@ bool ParseOptions(int argc, char* argv[])
749
752
else
750
753
{
751
754
int i = s_threadFilterCount++;
752
- s_threadFilter[i] = strtoul (arg, &end, 16 );
755
+ s_threadFilter[i] = strtoull (arg, &end, 16 );
753
756
}
754
757
if (*end == ' ,' )
755
758
{
@@ -848,6 +851,10 @@ bool ParseOptions(int argc, char* argv[])
848
851
}
849
852
break ;
850
853
854
+ case ' a' :
855
+ case ' A' :
856
+ s_showAllMessages = true ;
857
+ break ;
851
858
case ' f' :
852
859
case ' F' :
853
860
if (arg[2 ] == ' \0 ' )
@@ -961,7 +968,7 @@ bool ParseOptions(int argc, char* argv[])
961
968
else
962
969
{
963
970
int i = s_printEarliestMessageFromThreadCount++;
964
- s_printEarliestMessageFromThread[i] = strtoul (arg, &end, 16 );
971
+ s_printEarliestMessageFromThread[i] = strtoull (arg, &end, 16 );
965
972
}
966
973
if (*end == ' ,' )
967
974
{
@@ -1106,7 +1113,7 @@ DWORD WINAPI ProcessStresslogWorker(LPVOID)
1106
1113
int numberOfArgs = (msg->numberOfArgsX << 3 ) + msg->numberOfArgs ;
1107
1114
if (!fIgnoreMessage )
1108
1115
{
1109
- bool fIncludeMessage = FilterMessage (hdr, tsl, msg->facility , format, deltaTime, numberOfArgs, msg->args );
1116
+ bool fIncludeMessage = s_showAllMessages || FilterMessage (hdr, tsl, msg->facility , format, deltaTime, numberOfArgs, msg->args );
1110
1117
if (!fIncludeMessage && s_valueFilterCount > 0 )
1111
1118
{
1112
1119
for (int i = 0 ; i < numberOfArgs; i++)
@@ -1218,6 +1225,7 @@ int ProcessStressLog(void* baseAddress, int argc, char* argv[])
1218
1225
s_timeFilterEnd = 0 ;
1219
1226
s_outputFileName = nullptr ;
1220
1227
s_fPrintFormatStrings = false ;
1228
+ s_showAllMessages = false ;
1221
1229
memset (&mapImageToStringId, 0 , sizeof (mapImageToStringId));
1222
1230
1223
1231
if (!ParseOptions (argc, argv))
0 commit comments