Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

rdtscp shifts in measurements of SGX application

wu__xianghong
Beginner
412 Views

I assign 4GB to the heap.

in ecall_init_array function:

#define ARRAYSIZE  1024*1024*1024

long * addr = new long[ARRAYSIZE]

for (int i = 0;i<ARRAYSIZE;i++)

{

     long tmp =0;

     /*some simple computation  for tmp*/

    addr = tmp;

}

I run this application by binding a specific core like:

taskset -c 2 ./app

and the result:

[0] ecall_init_array cpu cycle consumes: 481875
[1] ecall_init_array cpu cycle consumes: 458252
[2] ecall_init_array cpu cycle consumes: 544906
[3] ecall_init_array cpu cycle consumes: 1875701
[4] ecall_init_array cpu cycle consumes: 1515500
[5] ecall_init_array cpu cycle consumes: 455037
[6] ecall_init_array cpu cycle consumes: 465117
[7] ecall_init_array cpu cycle consumes: 1501333
[8] ecall_init_array cpu cycle consumes: 452456
[9] ecall_init_array cpu cycle consumes: 470103

why does it happen? some cpu cycle consumes is the three times to the others.

0 Kudos
0 Replies
Reply