aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-06 11:02:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-06 11:02:58 -0500
commit35b740e4662ef386f0c60e1b60aaf5b44db9914c (patch)
tree502a8f9499bc1b4cb3300d666dab2d01a1921224 /kernel/lockdep.c
parent423d091dfe58d3109d84c408810a7cfa82f6f184 (diff)
parent9e183426bfb52bb44bf3c443d6587e4d02478603 (diff)
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (106 commits) perf kvm: Fix copy & paste error in description perf script: Kill script_spec__delete perf top: Fix a memory leak perf stat: Introduce get_ratio_color() helper perf session: Remove impossible condition check perf tools: Fix feature-bits rework fallout, remove unused variable perf script: Add generic perl handler to process events perf tools: Use for_each_set_bit() to iterate over feature flags perf tools: Unify handling of features when writing feature section perf report: Accept fifos as input file perf tools: Moving code in some files perf tools: Fix out-of-bound access to struct perf_session perf tools: Continue processing header on unknown features perf tools: Improve macros for struct feature_ops perf: builtin-record: Document and check that mmap_pages must be a power of two. perf: builtin-record: Provide advice if mmap'ing fails with EPERM. perf tools: Fix truncated annotation perf script: look up thread using tid instead of pid perf tools: Look up thread names for system wide profiling perf tools: Fix comm for processes with named threads ...
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 8fb755132322..8889f7dd7c46 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -500,36 +500,32 @@ void get_usage_chars(struct lock_class *class, char usage[LOCK_USAGE_CHARS])
500 usage[i] = '\0'; 500 usage[i] = '\0';
501} 501}
502 502
503static int __print_lock_name(struct lock_class *class) 503static void __print_lock_name(struct lock_class *class)
504{ 504{
505 char str[KSYM_NAME_LEN]; 505 char str[KSYM_NAME_LEN];
506 const char *name; 506 const char *name;
507 507
508 name = class->name; 508 name = class->name;
509 if (!name)
510 name = __get_key_name(class->key, str);
511
512 return printk("%s", name);
513}
514
515static void print_lock_name(struct lock_class *class)
516{
517 char str[KSYM_NAME_LEN], usage[LOCK_USAGE_CHARS];
518 const char *name;
519
520 get_usage_chars(class, usage);
521
522 name = class->name;
523 if (!name) { 509 if (!name) {
524 name = __get_key_name(class->key, str); 510 name = __get_key_name(class->key, str);
525 printk(" (%s", name); 511 printk("%s", name);
526 } else { 512 } else {
527 printk(" (%s", name); 513 printk("%s", name);
528 if (class->name_version > 1) 514 if (class->name_version > 1)
529 printk("#%d", class->name_version); 515 printk("#%d", class->name_version);
530 if (class->subclass) 516 if (class->subclass)
531 printk("/%d", class->subclass); 517 printk("/%d", class->subclass);
532 } 518 }
519}
520
521static void print_lock_name(struct lock_class *class)
522{
523 char usage[LOCK_USAGE_CHARS];
524
525 get_usage_chars(class, usage);
526
527 printk(" (");
528 __print_lock_name(class);
533 printk("){%s}", usage); 529 printk("){%s}", usage);
534} 530}
535 531