Whamcloud - gitweb
LU-969 debug: reduce stack usage
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-tracefile.c
index 0bbcac9..51d7d7f 100644 (file)
@@ -181,22 +181,23 @@ int cfs_tcd_owns_tage(struct cfs_trace_cpu_data *tcd,
 }
 
 void
-cfs_set_ptldebug_header(struct ptldebug_header *header, int subsys, int mask,
-                        const int line, unsigned long stack)
+cfs_set_ptldebug_header(struct ptldebug_header *header,
+                        struct libcfs_debug_msg_data *msgdata,
+                        unsigned long stack)
 {
        struct timeval tv;
 
        do_gettimeofday(&tv);
 
-       header->ph_subsys = subsys;
-       header->ph_mask = mask;
+       header->ph_subsys = msgdata->msg_subsys;
+       header->ph_mask = msgdata->msg_mask;
        header->ph_cpu_id = cfs_smp_processor_id();
        header->ph_type = cfs_trace_buf_idx_get();
        header->ph_sec = (__u32)tv.tv_sec;
        header->ph_usec = tv.tv_usec;
        header->ph_stack = stack;
        header->ph_pid = current->pid;
-       header->ph_line_num = line;
+       header->ph_line_num = msgdata->msg_line;
        header->ph_extern_pid = 0;
        return;
 }