linux-lts-quantal-3.5.0/kernel/replay.c
/* Creates a new replay group for the replaying process info */
Creates a new replay group for the replaying process info
Creates a new replay group for the replaying process info
static struct replay_group*
new_replay_group (struct record_group* prec_group, int follow_splits)
{
	struct replay_group* prg;
	prg = KMALLOC (sizeof(struct replay_group), GFP_KERNEL);
	if (prg == NULL) {
		printk ("Cannot allocate replay_group\n");
		goto err;
	}
	DPRINT ("new_replay_group: %p\n", prg);
	prg->rg_rec_group = prec_group;
	prg->rg_follow_splits = follow_splits;
	prg->rg_replay_threads = ds_list_create(NULL, 0, 1);
	if (prg->rg_replay_threads == NULL) {
		printk ("Cannot create replay_group rg_replay_threads\n");
		goto err_replaythreads;
	}
	atomic_set (&prg->rg_refcnt, 0);
	prg->rg_reserved_mem_list = ds_list_create (rm_cmp, 0, 1);
	prg->rg_used_address_list = NULL;
	get_record_group (prec_group);
#ifdef REPLAY_STATS
	atomic_inc(&rstats.started);
#endif
	return prg;
err_replaythreads:
	KFREE (prg);
err:
	return NULL;
}
static struct replay_group * new_replay_group ( struct record_group * prec_group , int follow_splits ) { struct replay_group * prg ; prg = KMALLOC ( sizeof ( struct replay_group ) , GFP_KERNEL ) ; if ( prg == NULL ) { printk ( " \n " ) ; goto err ; } DPRINT ( " \n " , prg ) ; prg -> rg_rec_group = prec_group ; prg -> rg_follow_splits = follow_splits ; prg -> rg_replay_threads = ds_list_create ( NULL , 0 , 1 ) ; if ( prg -> rg_replay_threads == NULL ) { printk ( " \n " ) ; goto err_replaythreads ; } atomic_set ( & prg -> rg_refcnt , 0 ) ; prg -> rg_reserved_mem_list = ds_list_create ( rm_cmp , 0 , 1 ) ; prg -> rg_used_address_list = NULL ; get_record_group ( prec_group ) ; #ifdef REPLAY_STATS atomic_inc ( & rstats . started ) ; #endif return prg ; err_replaythreads : KFREE ( prg ) ; err : return NULL ; }
Creates a new replay group for the replaying process info
Creates a new replay group for the replaying process info
// Record group should not be destroyed before replay group