CCTLib
Calling-context and data-object attribution library for Intel Pin
footprint_avx32_sweep.c
Go to the documentation of this file.
1
// footprint ISA test: AVX 32-byte stride sweep.
2
// Each iteration issues one 32B AVX store to a NEW address (stride 32B).
3
// N=100000 unique 32B slots => footprint should be at least 100000 * 32 /
4
// (footprint's unit) bytes distinct addresses.
5
//
6
// This exercises footprint tracking under wide SIMD stores that touch
7
// multiple bytes per instruction.
8
#include <stdint.h>
9
#define N 100000
10
static
volatile
uint64_t
sink
;
11
static
uint64_t
buf
[
N
* 4]
__attribute__
((aligned(32)));
12
int
main
(
int
argc,
char
** argv) {
13
(void)argc; (void)argv;
14
for
(
int
i = 0; i <
N
; ++i) {
15
__asm__ __volatile__(
16
"vmovdqu %%ymm0, (%0)\n\t"
// 32B store to a fresh cacheline
17
:
18
:
"r"
(&
buf
[i * 4])
19
:
"memory"
,
"ymm0"
);
20
}
21
sink
=
buf
[0];
22
return
0;
23
}
buf
static uint64_t buf[ITERS]
Definition:
exc_catchall.cpp:12
N
#define N
Definition:
footprint_avx32_sweep.c:9
main
int main(int argc, char **argv)
Definition:
footprint_avx32_sweep.c:12
__attribute__
static uint64_t buf[N *4] __attribute__((aligned(32)))
sink
static volatile uint64_t sink
Definition:
footprint_avx32_sweep.c:10
tests
gtest
apps
isa
footprint_avx32_sweep.c
Generated on Wed Jul 15 2026 04:51:30 for CCTLib by
1.9.1