Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61642
b: refs/heads/master
c: d38e1d5
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Jul 19, 2007
1 parent 0427780 commit cf1ee0b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96645678cd726e87ce42a0664de71e047e32bca4
refs/heads/master: d38e1d5aaee384698fcef9455d6e2df1d062a1d0
24 changes: 23 additions & 1 deletion trunk/kernel/lockdep_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,30 @@ static void seq_stats(struct seq_file *m, struct lock_stat_data *data)
class = data->class;
stats = &data->stats;

snprintf(name, 38, "%s", class->name);
namelen = 38;
if (class->name_version > 1)
namelen -= 2; /* XXX truncates versions > 9 */
if (class->subclass)
namelen -= 2;

if (!class->name) {
char str[KSYM_NAME_LEN];
const char *key_name;

key_name = __get_key_name(class->key, str);
snprintf(name, namelen, "%s", key_name);
} else {
snprintf(name, namelen, "%s", class->name);
}
namelen = strlen(name);
if (class->name_version > 1) {
snprintf(name+namelen, 3, "#%d", class->name_version);
namelen += 2;
}
if (class->subclass) {
snprintf(name+namelen, 3, "/%d", class->subclass);
namelen += 2;
}

if (stats->write_holdtime.nr) {
if (stats->read_holdtime.nr)
Expand Down

0 comments on commit cf1ee0b

Please sign in to comment.