14
14
/* description of the "Transactional-Execution Facility". */
15
15
/*-------------------------------------------------------------------*/
16
16
17
+ /*-------------------------------------------------------------------*/
18
+ /* Credit where credit is due */
19
+ /*-------------------------------------------------------------------*/
20
+ /* The overall design of Hercules's Transactional-Execution Facility */
21
+ /* was originally designed by Bob Wood so he gets most of the credit */
22
+ /* for what you see. Fish only gets credit for minor corrections and */
23
+ /* enhancements to Bob's design. I just wanted to make that clear. */
24
+ /* It was only Fish which then -- along with LOTS of help from MANY */
25
+ /* other fellow Hercules developers -- that made various minor fixes */
26
+ /* and enhancements to Bob's original design to reach the point of */
27
+ /* what you see here. But it is Bob Wood that is the TRUE HERCULEAN */
28
+ /* that should get the bulk of the credit for Hercules's overall TXF */
29
+ /* (Transactional Execution Facility) implementation. THANKS BOB! */
30
+ /* And a special THANK YOU to Peter J. and Jürgen W. too for all of */
31
+ /* the MANY long hours each of you put in testing and bug hunting! */
32
+ /* Thank you all! You're the greatest! The Hercules project is truly */
33
+ /* indebted to each and every one of you! Thank you! :`) */
34
+ /*-------------------------------------------------------------------*/
35
+
17
36
#include "hstdinc.h"
18
37
19
38
#define _TRANSACT_C_
@@ -266,6 +285,8 @@ int txf_tnd, txf_tac, slot;
266
285
}
267
286
RELEASE_TXFLOCK ( regs );
268
287
288
+ TXF_TRACE_INIT ( regs );
289
+
269
290
/* Still in transaction-execution mode? */
270
291
if (txf_tnd )
271
292
{
@@ -288,7 +309,7 @@ int txf_tnd, txf_tac, slot;
288
309
{
289
310
// "TXF: %s%02X: %sSuccessful %s Nested TEND for TND %d => %d"
290
311
WRMSG ( HHC17700 , "D" , TXF_CPUAD ( regs ), TXF_QSIE ( regs ),
291
- regs -> txf_contran ? "Cons" : "Uncons" , txf_tnd + 1 , txf_tnd );
312
+ TXF_CONSTRAINED ( regs -> txf_contran ) , txf_tnd + 1 , txf_tnd );
292
313
}
293
314
294
315
/* If we're now at or below the highest nesting level
@@ -426,7 +447,7 @@ int txf_tnd, txf_tac, slot;
426
447
{
427
448
// "TXF: %s%02X: %sSuccessful Outermost %s TEND"
428
449
WRMSG ( HHC17701 , "D" , TXF_CPUAD ( regs ), TXF_QSIE ( regs ),
429
- txf_contran ? "Cons" : "Uncons" );
450
+ TXF_CONSTRAINED ( txf_contran ) );
430
451
}
431
452
432
453
/* Commit all of our transactional changes */
@@ -724,6 +745,8 @@ TPAGEMAP *pmap;
724
745
/* set cc=0 at transaction start */
725
746
regs -> psw .cc = TXF_CC_SUCCESS ;
726
747
748
+ TXF_TRACE_INIT ( regs );
749
+
727
750
/* first/outermost transaction? */
728
751
if (regs -> txf_tnd == 1 )
729
752
{
@@ -922,7 +945,7 @@ TPAGEMAP *pmap;
922
945
}
923
946
924
947
/*--------------------------------------------------------------*/
925
- /* Report failed CONSTRAINED transaction retries */
948
+ /* Report failed transaction retries */
926
949
/*--------------------------------------------------------------*/
927
950
if (1
928
951
&& MLVL ( VERBOSE )
@@ -972,7 +995,6 @@ static const int tac2cc[20] =
972
995
};
973
996
#endif /* defined( _FEATURE_073_TRANSACT_EXEC_FACILITY ) */
974
997
975
-
976
998
/*-------------------------------------------------------------------*/
977
999
/* abort_transaction */
978
1000
/*-------------------------------------------------------------------*/
@@ -1036,20 +1058,7 @@ int retry; /* Actual retry code */
1036
1058
if (!regs -> txf_tac )
1037
1059
regs -> txf_tac = txf_tac ;
1038
1060
1039
- /* Identify who called us (if appropriate) */
1040
- if (1
1041
- && TXF_TRACING () // (debug tracing enabled?)
1042
- && MLVL ( VERBOSE ) // (verbose debug messages?)
1043
- // (non-specific tracing or
1044
- // tracing matches specifics...)
1045
- && TXF_TRACE_CPU ( regs )
1046
- && TXF_TRACE_TND ( regs )
1047
- && TXF_TRACE_WHY ( regs )
1048
- && TXF_TRACE_TAC ( regs )
1049
- && TXF_TRACE_FAILS ( regs )
1050
- )
1051
- // "TXF: %s%02X: %sabort_transaction called from %s"
1052
- WRMSG ( HHC17722 , "D" , TXF_CPUAD ( regs ), TXF_QSIE ( regs ), TRIMLOC ( loc ));
1061
+ TXF_TRACE_INIT ( regs );
1053
1062
1054
1063
// LOGIC ERROR if CPU not in transactional-execution mode
1055
1064
if (!regs -> txf_tnd )
@@ -1144,7 +1153,7 @@ int retry; /* Actual retry code */
1144
1153
// "TXF: %s%02X: %sFailed %s %s Transaction for TND %d: %s = %s, why =%s"
1145
1154
WRMSG ( HHC17703 , "D" , TXF_CPUAD ( regs ), TXF_QSIE ( regs ),
1146
1155
txf_tnd > 1 ? "Nested" : "Outermost" ,
1147
- txf_contran ? "Cons" : "Uncons" , txf_tnd ,
1156
+ TXF_CONSTRAINED ( txf_contran ) , txf_tnd ,
1148
1157
tac2short ( txf_tac ), tac2long ( txf_tac ), why );
1149
1158
1150
1159
/* If this is a delayed abort, log who detected/requested it */
@@ -2044,7 +2053,6 @@ DLL_EXPORT BYTE* txf_maddr_l( const U64 vaddr, const size_t len,
2044
2053
regs -> txf_why |= TXF_WHY_MAX_PAGES ;
2045
2054
2046
2055
PTT_TXF ( "*TXF mad max" , txf_tac , regs -> txf_contran , regs -> txf_tnd );
2047
- regs -> txf_why |= TXF_WHY_MAX_PAGES ;
2048
2056
ABORT_TRANS ( regs , ABORT_RETRY_CC , txf_tac );
2049
2057
UNREACHABLE_CODE ( return maddr );
2050
2058
}
0 commit comments