Composing Functional and State-Based Performance Models for Analyzing Heterogeneous Real-Time Systems