Multithreaded production software often suffers from lock-related inefficiencies that cause severe performance degradation. These issues are difficult to detect before a significant performance drop, and even skilled programmers struggle to resolve them without knowing whether frequent lock acquisition or contention is to blame. As transformer-based language models have shown strong potential in automating code analysis, we present Luna, a transformer-based static binary analysis tool for identifying inefficient locks. We formalize the classification task for frequent lock acquisition and contention in multithreaded binaries and design a transformer-based model with calling context awareness. By combining this model with static control flow analysis, Luna can identify suspicious lock operations along with their inefficiency type and call path attribution. Guided by Luna, developers can detect inefficient locks without executing the program and achieve significant performance gains through early optimization.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Exploiting Transformer-Based Static Binary Analysis for Identifying Inefficient Locks

  • Zhibo Xuan,
  • Xin You,
  • Hailong Yang,
  • Jingqi Chen,
  • Zhongzhi Luan,
  • Yi Liu,
  • Depei Qian

摘要

Multithreaded production software often suffers from lock-related inefficiencies that cause severe performance degradation. These issues are difficult to detect before a significant performance drop, and even skilled programmers struggle to resolve them without knowing whether frequent lock acquisition or contention is to blame. As transformer-based language models have shown strong potential in automating code analysis, we present Luna, a transformer-based static binary analysis tool for identifying inefficient locks. We formalize the classification task for frequent lock acquisition and contention in multithreaded binaries and design a transformer-based model with calling context awareness. By combining this model with static control flow analysis, Luna can identify suspicious lock operations along with their inefficiency type and call path attribution. Guided by Luna, developers can detect inefficient locks without executing the program and achieve significant performance gains through early optimization.