Understand a semantic error in this simplistic kernel function counter script
Frank Ch. Eigler
fche@redhat.com
Fri Sep 2 14:56:00 GMT 2016
leonconstantin.fopa wrote:
> [...]
> I am writing a systemTap script to count the number of time the
> free_hot_page kernel function is call during every 5 seconds.
OK.
> probe timer.s(5) {
> free_hot_page <<< 0
BTW, what is that <<< 0 intended to do? It won't change the @sum.
In very old versions of systemtap, @sum() of an empty aggregate
caused an error, but it has evaluated to 0 since version 1.5
(2011-05-23).
> However, running this simple code produce semantic error (see below).
> What does this error means and how to fix the problem ?
> [...]
> semantic error: while resolving probe point: identifier 'kernel' at
> count-page-cache-release.stp:13:7
> source : probe kernel.function("free_hot_page"){
> ^
>
> semantic error: no match (similar functions: free_arg_page,
> free_huge_page, free_one_page, free_p2m_page, __free_one_page)
>
> Pass 2: analysis failed. [man error::pass2]
It means that it could not find a function called free_hot_page in the
kernel, and is suggesting a few similarly-named functions that you may
have meant instead. Maybe you meant "free_hot_cold_page" ? Use
% stap -l 'kernel.function("free*page*")'
See also
% man error::pass2
which gives relevant advice.
- FChE
More information about the Systemtap
mailing list