The function is undefined only at x=0 (as there is a denominator of x). Then, to look for asymptotes and holes, we will check what happens as x->0, as well as the end behavior of the function, that is, what happens when x->oo and when x->-oo.
First, looking as x->0:
Regardless of what happens to 1/x, we have -1 <= cos(1/x)<= 1.
Thus -x <= xcos(1/x) <= x, and so
as x->0, xcos(1/x)->0.
Then there is no asymptote at x=0, but xcos(1/x) is undefined at that point, meaning f(x) has a hole at x=0.
Now, looking at the end behavior, 1/x->0 as x->+-oo, meaning
cos(1/x)->cos(0) = 1
Thus xcos(1/x) -> +-oo as x->+-oo
So there are no horizontal asymptotes.
But cos(1/x) becomes closer and closer to 1 as x->+-oo, meaning f(x) gets closer and closer to the line y=x. Thus y=x is a slant asymptote for f(x).