|
Lines 1145-1150
Link Here
|
| 1145 |
do_lcp_loop(signal, true); |
1145 |
do_lcp_loop(signal, true); |
| 1146 |
} |
1146 |
} |
| 1147 |
|
1147 |
|
|
|
1148 |
NdbOut& |
| 1149 |
operator<<(NdbOut& out, Ptr<Pgman::Page_request> ptr) |
| 1150 |
{ |
| 1151 |
const Pgman::Page_request& pr = *ptr.p; |
| 1152 |
const char* bname = getBlockName(pr.m_block, "?"); |
| 1153 |
out << "PR"; |
| 1154 |
if (ptr.i != RNIL) |
| 1155 |
out << " [" << dec << ptr.i << "]"; |
| 1156 |
out << " block=" << bname; |
| 1157 |
out << " flags=" << hex << pr.m_flags; |
| 1158 |
out << "," << dec << (pr.m_flags & Pgman::Page_request::OP_MASK); |
| 1159 |
{ |
| 1160 |
if (pr.m_flags & Pgman::Page_request::LOCK_PAGE) |
| 1161 |
out << ",lock_page"; |
| 1162 |
if (pr.m_flags & Pgman::Page_request::EMPTY_PAGE) |
| 1163 |
out << ",empty_page"; |
| 1164 |
if (pr.m_flags & Pgman::Page_request::ALLOC_REQ) |
| 1165 |
out << ",alloc_req"; |
| 1166 |
if (pr.m_flags & Pgman::Page_request::COMMIT_REQ) |
| 1167 |
out << ",commit_req"; |
| 1168 |
if (pr.m_flags & Pgman::Page_request::DIRTY_REQ) |
| 1169 |
out << ",dirty_req"; |
| 1170 |
if (pr.m_flags & Pgman::Page_request::CORR_REQ) |
| 1171 |
out << ",corr_req"; |
| 1172 |
} |
| 1173 |
return out; |
| 1174 |
} |
| 1175 |
|
| 1176 |
NdbOut& |
| 1177 |
operator<<(NdbOut& out, Ptr<Pgman::Page_entry> ptr) |
| 1178 |
{ |
| 1179 |
const Pgman::Page_entry pe = *ptr.p; |
| 1180 |
Uint32 list_no = Pgman::get_sublist_no(pe.m_state); |
| 1181 |
out << "PE [" << dec << ptr.i << "]"; |
| 1182 |
out << " state=" << hex << pe.m_state; |
| 1183 |
{ |
| 1184 |
if (pe.m_state & Pgman::Page_entry::REQUEST) |
| 1185 |
out << ",request"; |
| 1186 |
if (pe.m_state & Pgman::Page_entry::EMPTY) |
| 1187 |
out << ",empty"; |
| 1188 |
if (pe.m_state & Pgman::Page_entry::BOUND) |
| 1189 |
out << ",bound"; |
| 1190 |
if (pe.m_state & Pgman::Page_entry::MAPPED) |
| 1191 |
out << ",mapped"; |
| 1192 |
if (pe.m_state & Pgman::Page_entry::DIRTY) |
| 1193 |
out << ",dirty"; |
| 1194 |
if (pe.m_state & Pgman::Page_entry::USED) |
| 1195 |
out << ",used"; |
| 1196 |
if (pe.m_state & Pgman::Page_entry::BUSY) |
| 1197 |
out << ",busy"; |
| 1198 |
if (pe.m_state & Pgman::Page_entry::LOCKED) |
| 1199 |
out << ",locked"; |
| 1200 |
if (pe.m_state & Pgman::Page_entry::PAGEIN) |
| 1201 |
out << ",pagein"; |
| 1202 |
if (pe.m_state & Pgman::Page_entry::PAGEOUT) |
| 1203 |
out << ",pageout"; |
| 1204 |
if (pe.m_state & Pgman::Page_entry::LOGSYNC) |
| 1205 |
out << ",logsync"; |
| 1206 |
if (pe.m_state & Pgman::Page_entry::LCP) |
| 1207 |
out << ",lcp"; |
| 1208 |
if (pe.m_state & Pgman::Page_entry::HOT) |
| 1209 |
out << ",hot"; |
| 1210 |
if (pe.m_state & Pgman::Page_entry::ONSTACK) |
| 1211 |
out << ",onstack"; |
| 1212 |
if (pe.m_state & Pgman::Page_entry::ONQUEUE) |
| 1213 |
out << ",onqueue"; |
| 1214 |
} |
| 1215 |
out << " list="; |
| 1216 |
if (list_no == ZNIL) |
| 1217 |
out << "NONE"; |
| 1218 |
else |
| 1219 |
{ |
| 1220 |
out << dec << list_no; |
| 1221 |
out << "," << Pgman::get_sublist_name(list_no); |
| 1222 |
} |
| 1223 |
out << " diskpage=" << dec << pe.m_file_no << "," << pe.m_page_no; |
| 1224 |
if (pe.m_real_page_i == RNIL) |
| 1225 |
out << " realpage=RNIL"; |
| 1226 |
else |
| 1227 |
out << " realpage=" << dec << pe.m_real_page_i; |
| 1228 |
out << " lsn=" << dec << pe.m_lsn; |
| 1229 |
out << " busy_count=" << dec << pe.m_busy_count; |
| 1230 |
#ifdef VM_TRACE |
| 1231 |
{ |
| 1232 |
LocalDLFifoList<Pgman::Page_request> |
| 1233 |
req_list(ptr.p->m_this->m_page_request_pool, ptr.p->m_requests); |
| 1234 |
if (! req_list.isEmpty()) |
| 1235 |
{ |
| 1236 |
Ptr<Pgman::Page_request> req_ptr; |
| 1237 |
out << " req:"; |
| 1238 |
for (req_list.first(req_ptr); req_ptr.i != RNIL; req_list.next(req_ptr)) |
| 1239 |
{ |
| 1240 |
out << " " << req_ptr; |
| 1241 |
} |
| 1242 |
} |
| 1243 |
} |
| 1244 |
#endif |
| 1245 |
return out; |
| 1246 |
} |
| 1247 |
|
| 1148 |
bool |
1248 |
bool |
| 1149 |
Pgman::process_lcp(Signal* signal) |
1249 |
Pgman::process_lcp(Signal* signal) |
| 1150 |
{ |
1250 |
{ |
|
Lines 2087-2191
Link Here
|
| 2087 |
return "?"; |
2187 |
return "?"; |
| 2088 |
} |
2188 |
} |
| 2089 |
|
2189 |
|
| 2090 |
NdbOut& |
|
|
| 2091 |
operator<<(NdbOut& out, Ptr<Pgman::Page_request> ptr) |
| 2092 |
{ |
| 2093 |
const Pgman::Page_request& pr = *ptr.p; |
| 2094 |
const char* bname = getBlockName(pr.m_block, "?"); |
| 2095 |
out << "PR"; |
| 2096 |
if (ptr.i != RNIL) |
| 2097 |
out << " [" << dec << ptr.i << "]"; |
| 2098 |
out << " block=" << bname; |
| 2099 |
out << " flags=" << hex << pr.m_flags; |
| 2100 |
out << "," << dec << (pr.m_flags & Pgman::Page_request::OP_MASK); |
| 2101 |
{ |
| 2102 |
if (pr.m_flags & Pgman::Page_request::LOCK_PAGE) |
| 2103 |
out << ",lock_page"; |
| 2104 |
if (pr.m_flags & Pgman::Page_request::EMPTY_PAGE) |
| 2105 |
out << ",empty_page"; |
| 2106 |
if (pr.m_flags & Pgman::Page_request::ALLOC_REQ) |
| 2107 |
out << ",alloc_req"; |
| 2108 |
if (pr.m_flags & Pgman::Page_request::COMMIT_REQ) |
| 2109 |
out << ",commit_req"; |
| 2110 |
if (pr.m_flags & Pgman::Page_request::DIRTY_REQ) |
| 2111 |
out << ",dirty_req"; |
| 2112 |
if (pr.m_flags & Pgman::Page_request::CORR_REQ) |
| 2113 |
out << ",corr_req"; |
| 2114 |
} |
| 2115 |
return out; |
| 2116 |
} |
| 2117 |
|
2190 |
|
| 2118 |
NdbOut& |
|
|
| 2119 |
operator<<(NdbOut& out, Ptr<Pgman::Page_entry> ptr) |
| 2120 |
{ |
| 2121 |
const Pgman::Page_entry pe = *ptr.p; |
| 2122 |
Uint32 list_no = Pgman::get_sublist_no(pe.m_state); |
| 2123 |
out << "PE [" << dec << ptr.i << "]"; |
| 2124 |
out << " state=" << hex << pe.m_state; |
| 2125 |
{ |
| 2126 |
if (pe.m_state & Pgman::Page_entry::REQUEST) |
| 2127 |
out << ",request"; |
| 2128 |
if (pe.m_state & Pgman::Page_entry::EMPTY) |
| 2129 |
out << ",empty"; |
| 2130 |
if (pe.m_state & Pgman::Page_entry::BOUND) |
| 2131 |
out << ",bound"; |
| 2132 |
if (pe.m_state & Pgman::Page_entry::MAPPED) |
| 2133 |
out << ",mapped"; |
| 2134 |
if (pe.m_state & Pgman::Page_entry::DIRTY) |
| 2135 |
out << ",dirty"; |
| 2136 |
if (pe.m_state & Pgman::Page_entry::USED) |
| 2137 |
out << ",used"; |
| 2138 |
if (pe.m_state & Pgman::Page_entry::BUSY) |
| 2139 |
out << ",busy"; |
| 2140 |
if (pe.m_state & Pgman::Page_entry::LOCKED) |
| 2141 |
out << ",locked"; |
| 2142 |
if (pe.m_state & Pgman::Page_entry::PAGEIN) |
| 2143 |
out << ",pagein"; |
| 2144 |
if (pe.m_state & Pgman::Page_entry::PAGEOUT) |
| 2145 |
out << ",pageout"; |
| 2146 |
if (pe.m_state & Pgman::Page_entry::LOGSYNC) |
| 2147 |
out << ",logsync"; |
| 2148 |
if (pe.m_state & Pgman::Page_entry::LCP) |
| 2149 |
out << ",lcp"; |
| 2150 |
if (pe.m_state & Pgman::Page_entry::HOT) |
| 2151 |
out << ",hot"; |
| 2152 |
if (pe.m_state & Pgman::Page_entry::ONSTACK) |
| 2153 |
out << ",onstack"; |
| 2154 |
if (pe.m_state & Pgman::Page_entry::ONQUEUE) |
| 2155 |
out << ",onqueue"; |
| 2156 |
} |
| 2157 |
out << " list="; |
| 2158 |
if (list_no == ZNIL) |
| 2159 |
out << "NONE"; |
| 2160 |
else |
| 2161 |
{ |
| 2162 |
out << dec << list_no; |
| 2163 |
out << "," << Pgman::get_sublist_name(list_no); |
| 2164 |
} |
| 2165 |
out << " diskpage=" << dec << pe.m_file_no << "," << pe.m_page_no; |
| 2166 |
if (pe.m_real_page_i == RNIL) |
| 2167 |
out << " realpage=RNIL"; |
| 2168 |
else |
| 2169 |
out << " realpage=" << dec << pe.m_real_page_i; |
| 2170 |
out << " lsn=" << dec << pe.m_lsn; |
| 2171 |
out << " busy_count=" << dec << pe.m_busy_count; |
| 2172 |
#ifdef VM_TRACE |
| 2173 |
{ |
| 2174 |
LocalDLFifoList<Pgman::Page_request> |
| 2175 |
req_list(ptr.p->m_this->m_page_request_pool, ptr.p->m_requests); |
| 2176 |
if (! req_list.isEmpty()) |
| 2177 |
{ |
| 2178 |
Ptr<Pgman::Page_request> req_ptr; |
| 2179 |
out << " req:"; |
| 2180 |
for (req_list.first(req_ptr); req_ptr.i != RNIL; req_list.next(req_ptr)) |
| 2181 |
{ |
| 2182 |
out << " " << req_ptr; |
| 2183 |
} |
| 2184 |
} |
| 2185 |
} |
| 2186 |
#endif |
| 2187 |
return out; |
| 2188 |
} |
| 2189 |
|
2191 |
|
| 2190 |
#ifdef VM_TRACE |
2192 |
#ifdef VM_TRACE |
| 2191 |
void |
2193 |
void |