In a concurrent system with N processes, vector clocks of size N, with a component associated with every process, are used for tracking dependencies between the events. Using vectors of size N leads to scalability problems and association of components with processes makes vector clocks cumbersome and inefficient for systems with dynamic number of processes. We present a class of logical clock algorithms, called chain clock, for tracking dependencies between relevant events based on generalizing a process to any chain in the computation poset. Chain clocks are generally able to track dependencies using fewer than N components and also adapt automatically to systems with dynamic number of processes. In particular, we compare the performance of Dynamic Chain Clock (DCC) with vector clock for multithreaded programs in Java. With 1% of total events being relevant events, DCC requires 10 times fewer components than vector clock and the traces are smaller by a factor of 100. Although DCC requires shared data structures, it is still 10 times faster than the vector clock algorithm in our experiments.