public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Listing probe alias resolution failures
@ 2007-05-15 21:14 patm
  2007-05-15 21:33 ` David Smith
  0 siblings, 1 reply; 19+ messages in thread
From: patm @ 2007-05-15 21:14 UTC (permalink / raw)
  To: systemtap

With (version 0.5.14 built 2007-04-30) of systemtap and kernel  
2.6.19.7 (i386), there are a lot (~220) of failures in the tapset like  
the following:



semantic error: no match for probe point while resolving probe point  
vm.write_shared_copy



To get a list of all of these, I pulled out some code from the  
systemtap GUI and made a quick standalone java program "listprobes",  
it works like the following:



$ java listprobes |wc --lines

1502



$ java listprobes

register_event

addevent.sunrpc

addevent.sunrpc.entry

addevent.sunrpc.return

...



$ java listprobes --format

probe register_event{}probe addevent.sunrpc{}probe  
addevent.sunrpc.entry{}probe addevent.sunrpc.

return{}probe addevent.sunrpc.clnt{}...



$ java listprobes --format |stap -p2 -u -

semantic error: no match for probe point while resolving probe point  
sunrpc.clnt.create_client

semantic error: no match for probe point while resolving probe point  
_addevent.sunrpc.clnt.create_client.entry

semantic error: no match for probe point while resolving probe point  
addevent.sunrpc.clnt.create_client.entry

semantic error: no match for probe point while resolving probe point  
sunrpc.clnt.create_client.return

semantic error: no match for probe point while resolving probe point  
_addevent.sunrpc.clnt.create_client.return

semantic error: no match for probe point while resolving probe point  
addevent.sunrpc.clnt.create_client.return

..



These failing probes can be kept track of on bugzilla or be addressed  
or be addressed by the tapset authors directly.

Attached below is the source for the listprobes java program.





Patrick McCormick

pmmccorm at us . ibm . com







import java.io.*;

import java.util.*;

import java.lang.*;





public class listprobes {

	private static boolean format;



public static void main (String[] argv) {

	if (argv.length != 0) format = true;

	else format = false;



	File tapdir = new File ("/usr/local/share/systemtap/tapset");

	String s = catProbes(tapdir);

	parseLevel1 (s);





return;

}



private static void parseLevel1(String s) {

	String prev = null;

	String prev2 = null;

	StringBuilder token = new StringBuilder("");

	char currChar;



	for(int i=0; i<s.length(); i++) {

		currChar = s.charAt(i);



		if(!Character.isWhitespace(currChar) && '}' != currChar && '{' != currChar)

			token.append(currChar);

		else if(token.length() > 0) {

			prev2 = prev;

			prev = token.toString();

			token.delete(0, token.length());

		}



		if(1 == token.length()) {



			if (token.toString().contains (",") &&  
!token.toString().contains("kernel.function")) { /* skip over alias of  
aliases */ }

			else if ("probe".equals(prev2) && "=".equals(token.toString())) {

				do {

					currChar = s.charAt(++i);

					token.append(currChar);

				} while('{' != currChar && i < s.length());



				if (format) System.out.print ("probe " + prev + "{}");

				else System.out.println (prev);



			}

			else { /* keep on moving */ }

		}



	}

} // end of method



private static String catProbes(File handle) {

	StringBuilder sb = new StringBuilder();



	if (handle.isDirectory()) {

		File[] contents = handle.listFiles();

		for (File file: contents) {

			sb.append (catProbes(file));

		}

		return sb.toString();

	}

	else if (handle.getAbsolutePath().endsWith (".stp")) {

		FileInputStream fis = null;

		InputStreamReader bis = null;

		BufferedReader reader = null;

		sb.append ("# file " + handle.getAbsolutePath() + "\n");



		try {

			fis = new FileInputStream (handle);

			bis = new InputStreamReader (fis);

			reader = new BufferedReader(bis);



			while (reader.ready()) sb.append (reader.readLine() + "\n");



				reader.close();

				bis.close();

				fis.close();

			}

			catch (IOException ioe) {

				// FIXME: hookup to logger

				// FIXME: close streams and readers here as well?

			}



		return sb.toString();

	}

	else return "\n"; // some non-tapset file, ignore



} // end of method



}

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2007-05-19 16:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 21:14 Listing probe alias resolution failures patm
2007-05-15 21:33 ` David Smith
2007-05-15 22:02   ` patm
2007-05-15 22:16   ` Mike Mason
2007-05-16 13:47     ` David Smith
2007-05-15 22:21   ` patm
2007-05-16 14:12     ` David Smith
2007-05-16 16:58       ` patm
2007-05-16 17:23         ` David Smith
2007-05-16 18:54           ` patm
2007-05-16 18:54           ` Frank Ch. Eigler
2007-05-16 20:18             ` David Smith
2007-05-16 20:30               ` Frank Ch. Eigler
2007-05-16 21:20                 ` David Smith
2007-05-16 21:59                   ` Frank Ch. Eigler
2007-05-18 20:05                     ` David Smith
2007-05-19  0:27                       ` Stone, Joshua I
2007-05-19 16:11                         ` Frank Ch. Eigler
2007-05-17  0:09                   ` Mike Mason

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).