The given differential equation is:
\[
\frac{dx}{dy} = \frac{x}{y}
\]
This is a separable differential equation. We can rewrite it as:
\[
\frac{dx}{x} = \frac{dy}{y}
\]
Now, integrate both sides:
\[
\int \frac{1}{x} \, dx = \int \frac{1}{y} \, dy
\]
This gives us:
\[
\log |x| = \log |y| + C
\]
or equivalently:
\[
\log |x| - \log |y| = C
\]
which simplifies to:
\[
\log \left( \frac{|x|}{|y|} \right) = C
\]
Exponentiating both sides:
\[
\frac{|x|}{|y|} = e^C
\]
Thus, the solution is:
\[
y = \log |x| + cx
\]
where \( c \) is a constant.
Therefore, the correct answer is:
\[
\boxed{y = \log |x| + cx}
\]