This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

no match while resolving probe point kernel.function("printk")


I am trying to execute this script.

# printk : time printing toggle
#
global toggle
probe kernel.function("printk")
{
	if(toggle == 1){
		printf("printk_time: %d ", $printk_time)
 		$printk_time = 1 - $printk_time
		printf("printk_time: %d", $printk_time)
	}
	exit()
}

probe begin
{
	toggle = $1
}

# stap -v -u printk-time-toggle.stp 1
Pass 1: parsed user script and 38 library script(s) in 290usr/10sys/308real ms.
semantic error: write to target variable not permitted: identifier '$printk_time' at printk-time-toggle.stp:8:4
semantic error: no match while resolving probe point kernel.function("printk")
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 1 global(s) in 490usr/150sys/640real ms.
Pass 2: analysis failed. Try again with more '-v' (verbose) options.


When I comment out the statement $printk_time = 1 - $printk_time, it compiles without complaining any semantic error.

# stap -v -u printk-time-toggle.stp 1
Pass 1: parsed user script and 38 library script(s) in 290usr/10sys/310real ms.
Pass 2: analyzed script: 2 probe(s), 7 function(s), 0 embed(s), 1 global(s) in 500usr/150sys/643real ms.
Pass 3: translated to C into "/tmp/stapFgfNHR/stap_fc59a3f7e1709e761b6ba97c2107c611_2021.c" in 0usr/0sys/1real ms.
Pass 4: compiled C into "stap_fc59a3f7e1709e761b6ba97c2107c611_2021.ko" in 2460usr/500sys/2874real ms.
Pass 5: starting run.
Pass 5: run completed in 60usr/70sys/5531real ms.


How can this happen?

# stap -V
SystemTap translator/driver (version 0.6.2/0.127 built 2008-03-27)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
# uname -a
Linux mpk12-etclab-158-187 2.6.23.17-88.fc7 #1 SMP Thu May 15 00:02:29 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux



Thanks, Om.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]