<commit_before>{ stdenv, version, kernelPlatform, extraConfig }:

with stdenv.lib;

''
  # Power management and debugging.
  DEBUG_KERNEL y
  PM_ADVANCED_DEBUG y
  PM_RUNTIME y
  TIMER_STATS y
  ${optionalString (versionOlder version "3.10") ''
    USB_SUSPEND y
  ''}
  BACKTRACE_SELF_TEST n
  CPU_NOTIFIER_ERROR_INJECT? n
  DEBUG_DEVRES n
  DEBUG_NX_TEST n
  DEBUG_STACK_USAGE n
  DEBUG_STACKOVERFLOW n
  RCU_TORTURE_TEST n
  SCHEDSTATS n

  # Support drivers that need external firmware.
  STANDALONE n

  # Make /proc/config.gz available.
  IKCONFIG_PROC y

  # Optimize with -O2, not -Os.
  CC_OPTIMIZE_FOR_SIZE n

  # Enable the kernel's built-in memory tester.<commit_msg>linux: Enable detection of hung tasks<commit_after>{ stdenv, version, kernelPlatform, extraConfig }:

with stdenv.lib;

''
  # Power management and debugging.
  DEBUG_KERNEL y
  PM_ADVANCED_DEBUG y
  PM_RUNTIME y
  TIMER_STATS y
  ${optionalString (versionOlder version "3.10") ''
    USB_SUSPEND y
  ''}
  BACKTRACE_SELF_TEST n
  CPU_NOTIFIER_ERROR_INJECT? n
  DEBUG_DEVRES n
  DEBUG_NX_TEST n
  DEBUG_STACK_USAGE n
  DEBUG_STACKOVERFLOW n
  RCU_TORTURE_TEST n
  SCHEDSTATS n
  DETECT_HUNG_TASK y

  # Support drivers that need external firmware.
  STANDALONE n

  # Make /proc/config.gz available.
  IKCONFIG_PROC y

  # Optimize with -O2, not -Os.
  CC_OPTIMIZE_FOR_SIZE n

  # Enable the kernel's built-in memory tester.
{'fraction_non_alphanumeric': 0.06343549536707056, 'fraction_numerical': 0.005702066999287242, 'mean_word_length': 3.7755102040816326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2266384', 'n_tokens_mistral': 557, 'n_tokens_neox': 523, 'n_words': 140}