Warning: Too many CFI instuctions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning: Too many CFI instuctions

Torsten Polle
Hi,

I get the following warning when calculating backtraces with SystemTap: "Too many CFI instuctions“. Therefore I change the output of the warning to print out the number of needed instructions.

Too many CFI instuctions: 723
Too many CFI instuctions: 967
Too many CFI instuctions: 571
Too many CFI instuctions: 555
Too many CFI instuctions: 2167
Too many CFI instuctions: 883
Too many CFI instuctions: 647
Too many CFI instuctions: 2691
Too many CFI instuctions: 787
Too many CFI instuctions: 931
Too many CFI instuctions: 1627
Too many CFI instuctions: 751
Too many CFI instuctions: 615
Too many CFI instuctions: 1283
Too many CFI instuctions: 619
Too many CFI instuctions: 663
Too many CFI instuctions: 727
Too many CFI instuctions: 759
Too many CFI instuctions: 579
Too many CFI instuctions: 527
Too many CFI instuctions: 959
Too many CFI instuctions: 1091
Too many CFI instuctions: 1335
Too many CFI instuctions: 515
Too many CFI instuctions: 843
Too many CFI instuctions: 1567
Too many CFI instuctions: 671
Too many CFI instuctions: 539
Too many CFI instuctions: 991
Too many CFI instuctions: 823
Too many CFI instuctions: 1211
Too many CFI instuctions: 627
Too many CFI instuctions: 667
Too many CFI instuctions: 695
Too many CFI instuctions: 639
Too many CFI instuctions: 691
Too many CFI instuctions: 635
Too many CFI instuctions: 587
Too many CFI instuctions: 2299
Too many CFI instuctions: 1019
Too many CFI instuctions: 763
Too many CFI instuctions: 547
Too many CFI instuctions: 523
Too many CFI instuctions: 1095
Too many CFI instuctions: 771
Too many CFI instuctions: 543
Too many CFI instuctions: 875
Too many CFI instuctions: 2223
Too many CFI instuctions: 535
Too many CFI instuctions: 903
Too many CFI instuctions: 799
Too many CFI instuctions: 755
Too many CFI instuctions: 1219
Too many CFI instuctions: 867
Too many CFI instuctions: 592
Too many CFI instuctions: 611
Too many CFI instuctions: 5547
Too many CFI instuctions: 1847

Consequently, I increase the maximum to 8192 in runtime/unwind.c.
#define MAX_CFI 8192

As a result SystemTap behaves as expected.

Would it be possible to either increase the size or make it configurable?

Regards,
Torsten


Reply | Threaded
Open this post in threaded view
|

Re: Warning: Too many CFI instuctions

Mark Wielaard
Hi Torsten,

On Sun, Nov 25, 2018 at 10:31:33PM +0100, Torsten Polle wrote:

> I get the following warning when calculating backtraces with SystemTap: "Too many CFI instuctions“. Therefore I change the output of the warning to print out the number of needed instructions.
>
> Too many CFI instuctions: 723
> Too many CFI instuctions: 967
> Too many CFI instuctions: 571
> Too many CFI instuctions: 555
> Too many CFI instuctions: 2167
> Too many CFI instuctions: 883
> Too many CFI instuctions: 647
> Too many CFI instuctions: 2691
> Too many CFI instuctions: 787
> Too many CFI instuctions: 931
> Too many CFI instuctions: 1627
> Too many CFI instuctions: 751
> Too many CFI instuctions: 615
> Too many CFI instuctions: 1283
> Too many CFI instuctions: 619
> Too many CFI instuctions: 663
> Too many CFI instuctions: 727
> Too many CFI instuctions: 759
> Too many CFI instuctions: 579
> Too many CFI instuctions: 527
> Too many CFI instuctions: 959
> Too many CFI instuctions: 1091
> Too many CFI instuctions: 1335
> Too many CFI instuctions: 515
> Too many CFI instuctions: 843
> Too many CFI instuctions: 1567
> Too many CFI instuctions: 671
> Too many CFI instuctions: 539
> Too many CFI instuctions: 991
> Too many CFI instuctions: 823
> Too many CFI instuctions: 1211
> Too many CFI instuctions: 627
> Too many CFI instuctions: 667
> Too many CFI instuctions: 695
> Too many CFI instuctions: 639
> Too many CFI instuctions: 691
> Too many CFI instuctions: 635
> Too many CFI instuctions: 587
> Too many CFI instuctions: 2299
> Too many CFI instuctions: 1019
> Too many CFI instuctions: 763
> Too many CFI instuctions: 547
> Too many CFI instuctions: 523
> Too many CFI instuctions: 1095
> Too many CFI instuctions: 771
> Too many CFI instuctions: 543
> Too many CFI instuctions: 875
> Too many CFI instuctions: 2223
> Too many CFI instuctions: 535
> Too many CFI instuctions: 903
> Too many CFI instuctions: 799
> Too many CFI instuctions: 755
> Too many CFI instuctions: 1219
> Too many CFI instuctions: 867
> Too many CFI instuctions: 592
> Too many CFI instuctions: 611
> Too many CFI instuctions: 5547
> Too many CFI instuctions: 1847
>
> Consequently, I increase the maximum to 8192 in runtime/unwind.c.
> #define MAX_CFI 8192
>
> As a result SystemTap behaves as expected.
>
> Would it be possible to either increase the size or make it configurable?

We could certainly make it larger and/or configurable.
Probably using it as:

#ifndef MAX_CFI
#define MAX_CFI 512
#endif

would make it possible to just use stap -DMAX_CFI=8192
(untested)

But what has 5000+ CFI instructions? That seems excessive.
As the comment says:

/* Limit the number of instructions we process. Arbitrary limit.
   512 should be enough for anybody... */

Apparently 512 isn't enough for everybody :)
But I am really curious what CFI is so big.

Thanks,

Mark