summaryrefslogtreecommitdiffstats
path: root/tapset/task.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-07-08 09:38:33 +0200
committerMark Wielaard <mjw@redhat.com>2009-07-08 09:41:09 +0200
commit51305196f1d078849da1718bb6ccfbed5af182ed (patch)
tree8662c946d604e8030c7a0b6727d5c6d50f40cc28 /tapset/task.stp
parent6b5e36b0fe03b9be11194916c066664d98153a14 (diff)
downloadsystemtap-steved-51305196f1d078849da1718bb6ccfbed5af182ed.tar.gz
systemtap-steved-51305196f1d078849da1718bb6ccfbed5af182ed.tar.xz
systemtap-steved-51305196f1d078849da1718bb6ccfbed5af182ed.zip
More gcc 4.5 'jump skips variable initialization' fixlets.
* tapset/ioblock.stp (__bio_start_sect): Declare, then initialize variables that could (through kread) take an early jump. * tapset/nfs_proc.stp (get_prot_from_client): Likewise. * tapset/scsi.stp (scsi_timer_pending): Likewise. * tapset/task.stp (task_cpu): Likewise. (task_open_file_handles): Likewise.
Diffstat (limited to 'tapset/task.stp')
-rw-r--r--tapset/task.stp30
1 files changed, 20 insertions, 10 deletions
diff --git a/tapset/task.stp b/tapset/task.stp
index f1a10b0a..1f4e0e6f 100644
--- a/tapset/task.stp
+++ b/tapset/task.stp
@@ -189,10 +189,13 @@ function task_cpu:long (task:long)
function task_open_file_handles:long (task:long)
%( kernel_v >= "2.6.15" %?
%{ /* pure */
- struct task_struct *t = (struct task_struct *)(long)THIS->task;
- struct files_struct *fs = kread(&(t->files));
- struct fdtable *f = kread(&(fs->fdt));
unsigned int count=0, fd, max;
+ struct task_struct *t;
+ struct files_struct *fs;
+ struct fdtable *f;
+ t = (struct task_struct *)(long)THIS->task;
+ fs = kread(&(t->files));
+ f = kread(&(fs->fdt));
rcu_read_lock();
max = kread(&(f->max_fds));
for (fd = 0; fd < max; fd++) {
@@ -205,9 +208,11 @@ function task_open_file_handles:long (task:long)
%}
%:
%{ /* pure */
- struct task_struct *t = (struct task_struct *)(long)THIS->task;
- struct files_struct *f = kread(&(t->files));
unsigned int count=0, fd, max;
+ struct task_struct *t;
+ struct files_struct *f;
+ t = (struct task_struct *)(long)THIS->task;
+ f = kread(&(t->files));
rcu_read_lock();
max = kread(&(f->max_fds));
for (fd = 0; fd < max; fd++) {
@@ -225,9 +230,12 @@ function task_open_file_handles:long (task:long)
function task_max_file_handles:long (task:long)
%( kernel_v >= "2.6.15" %?
%{ /* pure */
- struct task_struct *t = (struct task_struct *)(long)THIS->task;
- struct files_struct *fs = kread (&(t->files));
- struct fdtable *f = kread(&(fs->fdt));
+ struct task_struct *t;
+ struct files_struct *fs;
+ struct fdtable *f;
+ t = (struct task_struct *)(long)THIS->task;
+ fs = kread (&(t->files));
+ f = kread(&(fs->fdt));
rcu_read_lock();
THIS->__retvalue = kread(&(f->max_fds));
rcu_read_unlock();
@@ -235,8 +243,10 @@ function task_max_file_handles:long (task:long)
%}
%:
%{ /* pure */
- struct task_struct *t = (struct task_struct *)(long)THIS->task;
- struct files_struct *f = kread(&(t->files));
+ struct task_struct *t;
+ struct files_struct *f;
+ t = (struct task_struct *)(long)THIS->task;
+ f = kread(&(t->files));
rcu_read_lock();
THIS->__retvalue = kread(&(f->max_fds));
rcu_read_unlock();