aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions
tle='author Dave Hansen <dave@linux.vnet.ibm.com> 2008-10-16 01:01:46 -0400 committer Linus Torvalds <torvalds@linux-foundation.org> 2008-10-16 14:21:31 -0400 profiling: dynamically enable readprofile at runtime' href='/cgit/cgit.cgi/litmus-rt-imx6.git/commit/kernel/ksysfs.c?id=22b8ce94708f7cdf0b04965c6f7443dfd374c35c'>22b8ce94708f
1596425fd754
5cb350baf580
088ab0b4d855
1da177e4c3f4

386f275f5d09
1da177e4c3f4

386f275f5d09
1da177e4c3f4

0f76e5acf9dc
386f275f5d09

1da177e4c3f4
386f275f5d09
1da177e4c3f4
0f76e5acf9dc

af66585270ef
386f275f5d09

0f76e5acf9dc
386f275f5d09
0f76e5acf9dc
386f275f5d09


0f76e5acf9dc
312c004d36ce
0f76e5acf9dc
386f275f5d09
312c004d36ce


0f76e5acf9dc


e3a1a5ec5cd5
1da177e4c3f4
22b8ce94708f






























c330dda908b5
386f275f5d09

c330dda908b5
386f275f5d09
c330dda908b5


386f275f5d09

c330dda908b5
386f275f5d09
c330dda908b5

fd59d231f81c
06a7f711246b



















386f275f5d09

fd59d231f81c
386f275f5d09
fd59d231f81c
d768281e97a4
fd59d231f81c


c330dda908b5

088ab0b4d855







3705b88db0d7
















da1a679cde9b


0b1937ac0ef1

da1a679cde9b

2c3c8bea6088

da1a679cde9b













0ff21e46630a

1da177e4c3f4

088ab0b4d855
0f76e5acf9dc

22b8ce94708f


c330dda908b5


06a7f711246b
fd59d231f81c
c330dda908b5
3705b88db0d7
1da177e4c3f4








bd35b93d8049
1da177e4c3f4
0ff21e46630a

bd35b93d8049


0ff21e46630a
bd35b93d8049



da1a679cde9b
0ff21e46630a
bd35b93d8049

da1a679cde9b

bd35b93d8049

bd35b93d8049
0ff21e46630a
bd35b93d8049
78a2d906b40f
bd35b93d8049
1da177e4c3f4



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237









                                                           


                          
                         
                       
                        
                          
                       
                        
                             

                               
                                                            

                               
                                             

                                                        
                                    

                                                                         
 
                                                                         
 

                              
                                                   

                                                                         
 
                                                   
 


                                                                 
 
                                             
                               
                                          


                                                    


                              
 
 






























                                                                         
                   

                                                                        
 
                                                   


                             

                                                                              
 
                                                         

                                   
 



















                                                                              

                                                                      
 
                                       
                                               
                                                          


                           

                         







                                                                         
















                                                                         


                                                                             

                                                      

                                                   

                                                                  













                                                              

                               

                                            
                          

                                 


                             


                                      
                                    
                              
      
                                 








                                                   
                  
 

                                                             


                                
                                                                    



                               
                                             
                                                                        

                                        

         

                 
           
                                                            
          
                                 
     



                           
/*
 * kernel/ksysfs.c - sysfs attributes in /sys/kernel, which
 * 		     are not related to any other subsystem
 *
 * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
 * 
 * This file is release under the GPLv2
 *
 */

#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kexec.h>
#include <linux/profile.h>
#include <linux/stat.h>
#include <linux/sched.h>
#include <linux/capability.h>

#define KERNEL_ATTR_RO(_name) \
static struct kobj_attribute _name##_attr = __ATTR_RO(_name)

#define KERNEL_ATTR_RW(_name) \
static struct kobj_attribute _name##_attr = \
	__ATTR(_name, 0644, _name##_show, _name##_store)

/* current uevent sequence number */
static ssize_t uevent_seqnum_show(struct kobject *kobj,
				  struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%llu\n", (unsigned long long)uevent_seqnum);
}
KERNEL_ATTR_RO(uevent_seqnum);

/* uevent helper program, used during early boot */
static ssize_t uevent_helper_show(struct kobject *kobj,
				  struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%s\n", uevent_helper);
}
static ssize_t uevent_helper_store(struct kobject *kobj,
				   struct kobj_attribute *attr,
				   const char *buf, size_t count)
{
	if (count+1 > UEVENT_HELPER_PATH_LEN)
		return -ENOENT;
	memcpy(uevent_helper, buf, count);
	uevent_helper[count] = '\0';
	if (count && uevent_helper[count-1] == '\n')
		uevent_helper[count-1] = '\0';
	return count;
}
KERNEL_ATTR_RW(uevent_helper);


#ifdef CONFIG_PROFILING
static ssize_t profiling_show(struct kobject *kobj,
				  struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%d\n", prof_on);
}
static ssize_t profiling_store(struct kobject *kobj,
				   struct kobj_attribute *attr,
				   const char *buf, size_t count)
{
	int ret;

	if (prof_on)
		return -EEXIST;
	/*
	 * This eventually calls into get_option() which
	 * has a ton of callers and is not const.  It is
	 * easiest to cast it away here.
	 */
	profile_setup((char *)buf);
	ret = profile_init();
	if (ret)
		return ret;
	ret = create_proc_profile();
	if (ret)
		return ret;
	return count;
}
KERNEL_ATTR_RW(profiling);
#endif

#ifdef CONFIG_KEXEC
static ssize_t kexec_loaded_show(struct kobject *kobj,
				 struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%d\n", !!kexec_image);
}
KERNEL_ATTR_RO(kexec_loaded);

static ssize_t kexec_crash_loaded_show(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%d\n", !!kexec_crash_image);
}
KERNEL_ATTR_RO(kexec_crash_loaded);

static ssize_t kexec_crash_size_show(struct kobject *kobj,
				       struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%zu\n", crash_get_memory_size());
}
static ssize_t kexec_crash_size_store(struct kobject *kobj,
				   struct kobj_attribute *attr,
				   const char *buf, size_t count)
{
	unsigned long cnt;
	int ret;

	if (strict_strtoul(buf, 0, &cnt))
		return -EINVAL;