-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify scripts to work when scsi is compiled into the kernel rather than in a loadable module #1
Comments
@dwalkes is there any update for this issue ? I have met the same issue. |
@markshao no, I didn't end up making any changes for this, sorry. |
@dwalkes, I'm the freshman for the systemtap , according to your comments. Looks like if we can replace the module(*) with the right module name/kernel function , then it will work , is that right? |
@markshao yes it has been a while since I wrote that comment but I believe that is all that is required to do it manually. This was just tracking a feature of the script to do this automagically |
I have replace the module(*).function with kernel.function, now I met some compile errors due to the missing variables. /tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c: In function ‘function_get_inode’:
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c:3645:59: error: ‘struct function_get_inode_locals’ has no member named ‘page’
struct page * thispage = (struct page *)(long)THIS->page;
^
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c: In function ‘function_set_sense_buf’:
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c:3745:65: error: ‘struct function_set_sense_buf_locals’ has no member named ‘cmd’
struct scsi_cmnd * scmd = (struct scsi_cmnd *)(long)THIS->cmd;
^
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c:3747:39: error: ‘struct function_set_sense_buf_locals’ has no member named ‘result’
scmd->result = (int)(long)THIS->result;
^
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c:3749:58: error: ‘struct function_set_sense_buf_locals’ has no member named ‘sensekey’
scmd->sense_buffer[2] = (unsigned char)(long)THIS->sensekey;
^
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c:3751:59: error: ‘struct function_set_sense_buf_locals’ has no member named ‘asc’
scmd->sense_buffer[12] = (unsigned char)(long)THIS->asc;
^
/tmp/stapxaOUM7/stap_8533dc89e8812c5ee2df2963d694c31f_34775_src.c:3752:59: error: ‘struct function_set_sense_buf_locals’ has no member named ‘ascq’
scmd->sense_buffer[13] = (unsigned char)(long)THIS->ascq; |
Hi @markshao - I haven't seen this before but a quick search of the systemtap docs hints that you may need to add an
pragma comment inside the relevant code block to use with recent versions of Systemtap. It's been a couple years since the last time I tried these scripts :) |
A user has reported issues when attempting to use the scripts:
Relevant stap -l output is:
In this case, the kernel was built with scsi compiled into the kernel rather than in a loadable module. Ideally the script would autodetect this condition and use kernel.function instead of module("*").
The text was updated successfully, but these errors were encountered: