This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Understand a semantic error in this simplistic kernel function counter script
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: FOPA Leon constantin <leonconstantin dot fopa at enseeiht dot fr>
- Cc: Systemtap <systemtap at sourceware dot org>
- Date: Fri, 02 Sep 2016 10:56:19 -0400
- Subject: Re: Understand a semantic error in this simplistic kernel function counter script
- Authentication-results: sourceware.org; auth=none
- References: <893f794edc057bc6aba8e163b69ceb17@inp-toulouse.fr>
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