* Understand a semantic error in this simplistic kernel function counter script
@ 2016-09-02 2:15 FOPA Leon constantin
2016-09-02 14:56 ` Frank Ch. Eigler
0 siblings, 1 reply; 2+ messages in thread
From: FOPA Leon constantin @ 2016-09-02 2:15 UTC (permalink / raw)
To: Systemtap
Hi,
I am writing a systemTap script to count the number of time the
free_hot_page kernel function is call during every 5 seconds.
The simplistic version of the code is the following :
global free_hot_page
probe kernel.function("free_hot_page"){
free_hot_page <<< 1
}
probe timer.s(5) {
free_hot_page <<< 0
hsum = @sum(free_hot_page)
printf("%29s %13d\n", tz_ctime(gettimeofday_s()), hsum)
delete free_hot_page
}
However, running this simple code produce semantic error (see below).
What does this error means and how to fix the problem ?
Best regards,
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]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Understand a semantic error in this simplistic kernel function counter script
2016-09-02 2:15 Understand a semantic error in this simplistic kernel function counter script FOPA Leon constantin
@ 2016-09-02 14:56 ` Frank Ch. Eigler
0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2016-09-02 14:56 UTC (permalink / raw)
To: FOPA Leon constantin; +Cc: Systemtap
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-02 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02 2:15 Understand a semantic error in this simplistic kernel function counter script FOPA Leon constantin
2016-09-02 14:56 ` Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).