Mithril help function ********************/ check whether last request is part of a sequential access */
| 490 | check whether last request is part of a sequential access |
| 491 | */ |
| 492 | static inline bool _Mithril_check_sequential(cache_t *cache, |
| 493 | const request_t *req) { |
| 494 | int i; |
| 495 | Mithril_params_t *Mithril_params = |
| 496 | (Mithril_params_t *)(cache->prefetcher->params); |
| 497 | if (Mithril_params->sequential_K == 0) return FALSE; |
| 498 | |
| 499 | request_t *new_req = my_malloc(request_t); |
| 500 | copy_request(new_req, req); |
| 501 | bool is_sequential = TRUE; |
| 502 | gint sequential_K = Mithril_params->sequential_K; |
| 503 | if (sequential_K == -1) { /* when use AMP, this is -1 */ |
| 504 | sequential_K = 1; |
| 505 | } |
| 506 | for (i = 0; i < sequential_K; i++) { |
| 507 | new_req->obj_id--; |
| 508 | if (!cache->find(cache, new_req, false)) { |
| 509 | is_sequential = FALSE; |
| 510 | break; |
| 511 | } |
| 512 | } |
| 513 | return is_sequential; |
| 514 | } |
| 515 | |
| 516 | static inline void _Mithril_rec_min_support_one(cache_t *cache, |
| 517 | const request_t *req) { |
no test coverage detected