Logo Search packages:      
Sourcecode: linux version File versions

int __init oprofile_arch_init ( struct oprofile_operations *  ops  ) 

One-time initialisation. *ops must be set to a filled-in operations structure. This is called even in timer interrupt mode so an arch can set a backtrace callback.

If an error occurs, the fields should be left untouched.

Definition at line 142 of file common.c.

{
      struct op_axp_model *lmodel = NULL;

      switch (implver()) {
      case IMPLVER_EV4:
            lmodel = &op_model_ev4;
            break;
      case IMPLVER_EV5:
            /* 21164PC has a slightly different set of events.
               Recognize the chip by the presence of the MAX insns.  */
            if (!amask(AMASK_MAX))
                  lmodel = &op_model_pca56;
            else
                  lmodel = &op_model_ev5;
            break;
      case IMPLVER_EV6:
            /* 21264A supports ProfileMe.
               Recognize the chip by the presence of the CIX insns.  */
            if (!amask(AMASK_CIX))
                  lmodel = &op_model_ev67;
            else
                  lmodel = &op_model_ev6;
            break;
      }

      if (!lmodel)
            return -ENODEV;
      model = lmodel;

      ops->create_files = op_axp_create_files;
      ops->setup = op_axp_setup;
      ops->shutdown = op_axp_shutdown;
      ops->start = op_axp_start;
      ops->stop = op_axp_stop;
      ops->cpu_type = lmodel->cpu_type;

      printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
             lmodel->cpu_type);

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index